WorksheetsTech quiz (first round)
Total questions: 20
Worksheet time: 7mins
Q1. Which data structure is most suitable for implementing recursion?
A) Queue
B) Array
C) Stack
D) Linked List
Q2. What is the worst-case time complexity to search an element in a balanced binary search tree?
A) O(n)
B) O(log n)
C) O(1)
D) O(n log n)
Q3. A priority queue can be efficiently implemented using:
A) Circular queue
B) Binary heap
C) Hash table
D) Linked list
Q4. In an AVL tree, what is the maximum difference between the heights of the left and right subtrees of any node?
A) 2
B) 1
C) log n
D) n
Q5. Which traversal of a binary search tree gives the nodes in sorted order?
A) Pre-order
B) Post-order
C) In-order
D) Level-order
Q6. Which scheduling algorithm may cause starvation?
A) Round Robin
B) FCFS
C) Priority Scheduling
D) Shortest Remaining Time First
Q7. The critical section problem is used to:
A) Protect shared resources from race conditions
B) Optimize memory allocation
C) Schedule processes
D) Manage deadlocks
Q8. In paging, the logical address is divided into:
A) Frame number and offset
B) Page number and offset
C) Segment number and page number
D) Page table and TLB
Q9. Which of the following is NOT a valid page replacement algorithm?
A) LRU
B) FIFO
C) SSTF
D) Optimal
Q10. Thrashing occurs when:
A) Processes are CPU-bound
B) High page-fault rate causes constant swapping
C) Deadlock happens
D) Cache memory is full
Q11. Which of the following is not a characteristic of ?
A) Sequential instruction execution
B) Shared data and instruction memory
C) Parallel pipelines for all operations
D) Stored program concept
Q12. Amdahl’s Law is used to predict:
A) Maximum speedup achievable by parallelizing part of a task
B) Cache replacement performance
C) Compiler optimization efficiency
D) Operating system scheduling
Q13. The number of bits needed to represent 256 unique values is:
A) 7
B) 8
C) 9
D) 16
Q14. Which of the following is not true about ?
A) Uses simple instructions
B) Uses fixed instruction size
C) Requires more general-purpose registers
D) Uses microcoded complex instructions
Q15. In Boolean algebra, the dual of (A + 0) is:
A) A ⋅ 1
B) A + 1
C) A ⋅ 0
D) 0
Q16. Which keyword is used to prevent inheritance of a class in Java?
A) static
B) final
C) abstract
D) private
Q17. Which of the following is not a Java primitive data type?
A) int
B) float
C) String
D) boolean
Q18. Which of these blocks will always execute whether an exception is thrown or not?
A) catch
B) try
C) finally
D) throw
Q19. What is the output of this code?
java
int x = 5;
System.out.println(x++ + ++x);
A) 11
B) 12
C) 10
D) 13
Q20. Which of the following is true about Java memory management?
A) It uses explicit delete() like 
B) It uses automatic garbage collection
C) Programmer must manually free objects
D) It has no heap memory
