Slideshow

Showing posts with label DS. Show all posts
Showing posts with label DS. Show all posts

Monday, 25 February 2013


Q.142 In ______, the difference between the height of the left sub tree and height of the right
tree, for each node, is almost one.
(A) Binary search tree (B) AVL - tree
(C) Complete tree (D) Threaded binary tree

Q.139 A full binary tree with 'n' non-leaf nodes contains
(A) log2 n nodes . (B) n+1 nodes.
(C) 2n nodes. (D) 2n+l nodes.

Q.135 The search technique for searching a sorted file that requires increased amount of space is
(A) indexed sequential search (B) interpolation search
(C) sequential search (D) tree search

Q.134 The sorting technique where array to be sorted is partitioned again and again in such a
way that all elements less than or equal to partitioning element appear before it and
those which are greater appear after it, is called
(A) merge sort (B) quick sort
(C) selection sort (D) none of these

Q.133 Linked lists are not suitable data structures for which one of the following problems
(A) insertion sort (B) binary search
(C) radix sort (D) polynomial manipulation

Q.132 Overflow condition in linked list may occur when attempting to_____
(A) Create a node when free space pool is empty.
(B) Traverse the nodes when free space pool is empty.
(C) Create a node when linked list is empty.
(D) None of these.

Q.131 Which of the following types of expressions do not require precedence rules for
evaluation?
(A) fully parenthesised infix expression
(B) postfix expression
(C) partially parenthesised infix expression
(D) more than one of the above

Q.101 The data structure needed to convert a recursion to an iterative procedure is
(A) Queue. (B) Graph.
(C) Stack. (D) Tree.

Q.81 How many distinct binary search trees can be formed which contains the integers 1, 2,
3?
(A) 6 (B) 5
(C) 4 (D) 3


Q.67 The constructed datatype of C is known as
(A) Pointers (B) String
(C) Structure (D) Array

Q.67 The constructed datatype of C is known as
(A) Pointers (B) String
(C) Structure (D) Array


52 Which of the following statement is true about a function?
(A) An invoking function must pass arguments to the invoked function.
(B) Every function returns a value to the invoker.
(C) A function may contain more than one return statement.
(D) Every function must be defined in its own separate file.

Q.51 What is the output of following statement?
for(i=1; i<4; i++)
printf(“%d”,(i%2) ? i : 2*i);
(A) 1 4 3 (B) 1 2 3
(C) 2 4 6 (D) 2 2 6

Q.41 Which is not dynamic memory allocation function?
(A) malloc (B) free
(C) alloc (D) calloc

Q.31 If ‘y’ is of integer type then the expressions
3* (y − 8)/9 and (y − 8)/9 * 3
(A) must yield the same value.
(B) must yield different values.
(C) may or may not yield the same value.
(D) none of the above.

Q.21 A global variable is a variable
(A) declared in the main ( ) function.
(B) declared in any function other than the main ( ) function.
(C) declared outside the body of every function.
(D) declared any where in the C program.

Q.11 In the for statement: for(exp1; exp2; exp3){ … }
where exp1, exp2 and exp3 are expressions. What is optional?
(A) None of the expressions is optional.
(B) Only exp1 is optional.
(C) Only exp1 and exp3 are optional.
(D) All the expressions are optional.

Q.11 In the for statement: for (exp1; exp2; exp3) { … }
where exp1, exp2 and exp3 are expressions. What is optional?
(A) None of the expressions is optional.
(B) Only exp1 is optional.
(C) Only exp1 and exp3 are optional.
(D) All the expressions are optional.

How do you calculate the complexity of sorting algorithms? Find the complexity
of Insertion sort and Bubble Sort. 

Distinguish between the following:
(i) Automatic and static variables
(ii) Global and local variables.