Month: August 2017

Square Matrix – Corner Elements Sum

              Square Matrix - Corner Elements Sum A square matrix of size N×N is passed as the input. The program must calculate and print the sum of the elements in the corners. Input Format:The first line will contain the value of N.The next N lines will contain the N

Count the primes in a range

                        Count the primes in a range                             Two whole numbers N1 and N2 are passed as input. The program must print the number of primes present between N1 and N2

Rotate String – N Positions

                    Rotate String - N Positions A string S of length L is passed as the input. The program must rotate the string S by N position in forward direction and print the result as the output. Input Format:The first line will contain the value of

Range Start and End Position

                    Range Start and End Position N integers are passed as input. X which is an integer is also passed as the input. The program must print the start S and end E positions of X in these N integers. -1 must be printed as the

Binary Search Tree – All operations

Binary Search Tree                                                 Implement a C program to construct a Binary Search Tree and also display the elements in the tree using Inorder , Preorder and Postorder traversals. Create a structure

Peak Elements Count

                           Peak Elements Count N integers are passed as input. The program must print the count of peak elements among the N integers. An element is a peak element if it is greater than it's neighbours (the elements to the left and right).The

Robot Picking Boxes

                            Robot Picking Boxes                           Robots are used to automate the process of picking up mobile phone boxes and relocating them within a warehouse. The boxes are stacked and arranged

Linked List : Add, modify ,deletion,search

L4 – Linked List :All operations Write a C program to add a node after a particular position in the Linked List. Define a structure struct node { int data; struct node * link; } Dont use a global variable for storing count … Each function will be checked individually…. Include functions append — to

SQL – Year wise Student Count

                    SQL - Year wise Student Count                                       student is a database table containing whose create DDL is given below. CREATE TABLE student(id int, name VARCHAR(100), department VARCHAR(3), year int); Write the SQL to list the year

Shirt – Matching Pairs

                      Shirt – Matching Pairs                                     A shop to increase sales during a festival has an offer that a customer will get a discount if the customer buys