July 17, 2021 in C and CPP
In an 16-bit computer, 30 digit integer can be stored in
1.9 In an 16-bit computer, 30 digit integer can be stored in
A) an integer variable
B) floating point variable
C) a circular list
D) none of the above
July 17, 2021 in C and CPP
1.9 In an 16-bit computer, 30 digit integer can be stored in
A) an integer variable
B) floating point variable
C) a circular list
D) none of the above
July 17, 2021 in C and CPP
1.8 Which of the following statements are true:
A) binary search is always better than sequential search.
B) binary search is better than sequential search when number of elements is small.
C) binary search is better than sequential search when number of elements is very large.
D) binary search is always inferior to sequential search.
July 17, 2021 in C and CPP
1.7 To implement the problem which checks whether parentheses, braces and brackets are in
proper position or not, stack has been used. If ((H)*{([J+K])}) is the expression, what will be the content of stack from bottom when input pointer is at J.
A) ({([
B) (( ){([
C) {([( )
D) ( )({([
July 17, 2021 in C and CPP
1.6 A forest is obtained from a tree when
A) its children are removed
B) a sub-tree is removed
C) root of the tree is removed
D) none of the above
July 17, 2021 in C and CPP
1.5 Binary Search Tree is a
A) tree whose right and left sub-tree has value less than root.
B) tree whose right and left sub-tree has value more than root.
C) tree whose left sub-tree has value less than root and right sub-tree has value more than
root.
D) none of the above.
July 17, 2021 in C and CPP
1.4 The property of hash function is that
A) it minimizes the rate of overflow
B) it preserves the order of key values.
C) it minimizes number of collisions.
D) none of the above.
July 17, 2021 in C and CPP
1.3 An ordered set of items from which items may be deleted at either end and into which
items may be inserted at either end is called.
A) Queue
B) Stack
C) Heap
D) Dequeue
July 17, 2021 in C and CPP
1.2 If the records to be sorted are in auxiliary storage, sorting is called
A) Internal
B) External
C) Stable
D) None of the above
July 17, 2021 in C and CPP
1.1 Maximum number of nodes in a binary tree of depth K
A) 2^K-1
B) 2^K
C) 2^K -1
D) 2^K +1
July 17, 2021 in C and CPP
b) Write a program which asks for a integer from the user. It reverses the integer and prints “same” if after reversal the number is same as old number otherwise it prints “not same”.