1. Stack is useful for implementing:
A. Recursion
B. Depth first search
C. Both (A) & (B)
D. Breadth first search
Ans. C
2. The least frequently used (LFU) page replacement algorithm requires_________
A. the page with the smallest count to be replaced.
B. the page with the longest count to be replaced.
C. the page with the smallest count was brought in, yet to be used.
D. the page with the longest count was brought in, yet to be used.
Ans. A
3. The time complexity of linear search algorithm over an array of n elements is
A. O (log2 n)
B. O (n)
C. O (n log2 n )
D. O (n2)
Ans. B
4. Which of the below functions is Not declared in math.h?
A. pow()
B. hex()
C. sqrt()
D. cos()
Ans. B
5. If malloc() fails to allocate the requested memory, it returns
A. Null
B. Garbage Value
C. Zero
D. None of the Mentioned
Ans. A
