πŸ“Š Data Structure and Algorithms (DSA)
Q. If the characters 'D', 'C', 'B', 'A' are placed in a queue (in that order), and then removed one at a time, in what order will they be removed?
  • (A) abcd
  • (B) abdc
  • (C) dcab
  • (D) dcba
πŸ’¬ Discuss
βœ… Correct Answer: (D) dcba
πŸ“Š Data Structure and Algorithms (DSA)
Q. In a ________ linked list, the last node's link field points to the first node of the list.
  • (A) circularly
  • (B) linearly
  • (C) sequentially
  • (D) indexed
πŸ’¬ Discuss
βœ… Correct Answer: (A) circularly
πŸ“Š Data Structure and Algorithms (DSA)
Q. _______ attacks the problem of fragmentation by moving all the allocated blocks to one end of memory, thus combining all the holes.
  • (A) underflow
  • (B) overflow
  • (C) compaction
  • (D) free storage
πŸ’¬ Discuss
βœ… Correct Answer: (B) overflow
πŸ“Š Data Structure and Algorithms (DSA)
Q. A sort which iteratively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
  • (A) insertion sort
  • (B) selection sort
  • (C) bubble sort
  • (D) merge sort
πŸ’¬ Discuss
βœ… Correct Answer: (B) selection sort
πŸ“Š Data Structure and Algorithms (DSA)
Q. What will be output if you will compile and execute the following c code?
#include <stdio.h>
#include <string.h>
int main(){
char c='\08';
printf("%d",c); return 0;
}
  • (A) 8
  • (B) \8\
  • (C) 9
  • (D) compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (D) compiler error
πŸ“Š Data Structure and Algorithms (DSA)
Q. Space Complexity iii) Is the strategy guaranteed to find the solution when there in one.
  • (A) a-iii, b-ii, c-i
  • (B) a-i, b-ii, c-iii
  • (C) a-iii, b-i, c-ii
  • (D) a-i, b-iii, c-ii
πŸ’¬ Discuss
βœ… Correct Answer: (C) a-iii, b-i, c-ii

Jump to