61. A sorting algorithm iteratively traverses through a list to exchange the first element with any element less than it. It then repeats with a new first element. What is this sorting algorithm called ?
A. Insertion Sort
B. Selection Sort
C. Heap Sort
D. Quick Sort
(a)
62. Recursion is executed in which order :
A. LIFO
B. FIFO
C. Random
D. All of the above
(a)
63. Which of the following ADT’s can be used to represent a many-a-many relation ?
A. Tree
B. Stack
C. Graph
D. Queue
(c)
64. Merge Sort algorithm is based on which algorithmic technique :
A. D&C
B. Dynamic Programming
C. Greedy
D. Brute Force
(a)
65. What will be the time complexity to add an element to the queue?
A. O(1)
B. O(log n)
C. O(n)
D. O(nlogn)
(a)
Ans 70 will be int. Remember return 0. Here 0 is int
Dear Anish,
If a return value isn’t required, declare the function to have void return type. If a return type isn’t specified, the C compiler assumes a default return type of int. In a main function, the return statement and expression are optional.