Pattern Consist of
Contains three sections (Data Structures and Algorithms, Analog Circuits, Digital Circuits) you have to choose any two sections among the three. Each section has 10 questions each and the total time for the two sections is 45 minutes. There is negative marking.
75 questions – 1 hour – Negative marking is there
Here is some sample Questions
int fact(int n) int fact_ii(int n)
if (n >0)
int fact_val = 1, i = 0;
return n*fact (n-1); for (i = 1; i <= n ; i++)
else fact_val = fact_val*i;
return 1; return fact_val;
(a) (i) only
(b) (ii) only
(d) None of these
(2) Which of the following is a semantic error?
(a) Division by zero
(b) Missing of a semicolon at the end of a statement
(c) Assigning a single precision real value to a long integer
(d) All the above
a. (x & (1 << i))
b. (x & (1 << i))
c. (x && (1 << i))
d. None of the above.
int i, count, x;
(3) If the following code segment is to count the no of zero’s in the given integer ‘x’ in its binary representation, what is to replaced by CONDITION?
(d) The graph can’t be colored
A graph was given and asked to find out the minimum no of colors required to color the graph?
(6) Which is not an advantage of using subroutines?
(a) Easier maintenance
(b) Runtime reduces
(c) Storage space reduces
Inorder traversal of a binary tree is d c e b a and preorder traversal of a binary tree is b c d e a. Find out the post order traversal?
(b) n*(n-1) – (n-k)(n-k-2)
(c) n*(n-1) – (n-k)(n-k-2)
(d) n*n – (n-k-1)
A k-diagonal matrix is a n *n square matrix in which the elements on the principal diagonal and k diagonals above the principal diagonal and k diagonals below the principal diagonal only have none zero elements. Other elements are zero’s. In order to save the space, the non zero elements are stored in a one dimensional array. The no of locations in this array are:
(a) O (N/P)
(b) O (P)
(c) O ( log (N/P))
(d) O ( log (N/P)) + O (P log P)
A 1D - array A whose size is N is given and is divided into P partitions and an element x is to be searched in the array. Each partition is given to one processor. The elements are searched with in the partition using a binary search. What is the time complexity of the algorithm?
p.next = q.next;
q.next = p;
Write the code segment to insert an element p into the linked list after an element q? Make necessary pointer adjustments?
Given a matrix A. What is the minimum no of multiplications do u need to compute A10 ?