Solved C& C++ technical paper of Nagarro
- A string of charater is given.Find the highest occurance of a character and display that character. eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE, OUTPUT: E or I,J(if equal occurance)
- Two sentences are given and we were required to print the common word in the two sentences. Words were delimited by space, full stop, ? , ! and , . The trick in the question was that common word should be printed only once so if ur first sentence contains two word "how" and second contains "how" then in output how should be printed only once for this u can replace each matched word in second sentence by spaces
- there is a matrix N x N .Its elements consist of either value =1 or value=0. If there is a any zero in the row, then the output matrix should have all zeroes in that row. If there is a single zero in any column then that column should have all zeroes n the output matrix. write the function to perform these operations
- Program to convert binary number into decimal number in c++
- write a program to check whether the given number was of the form 3^n. ( i.e. 3 to the power n).
- There are two sorted arrays, a1 and a2 of size n1 and size n2 respectively. array a1 is full, array a2 has exactly n1(size of array a1) empty space. Example, a1[]=1234, a2[]=56789_ _ _ _ Write a function to merge these two arrays to form a sorted array without any extra memory use.
- suppose u r given a 4*3 rectangle like (take these values from user) Now u have to calculate the no. of squares in this rectangle like: No. of squares of dimension 1 is 12 No. of squares of dimension 2 is 6 No. of squares of dimension 3 is 2 No. of squares of dimension 4 is 0 Total no. of squares are 20.
0 comments:
Post a Comment