Which operation views the front element without removing it?
APEAK
BPEEK
CPEEL
DPEAL
Answer & Solution
Correct answer: B. PEEK
1. Sometimes the front value is wanted but the queue must stay intact.
2. A separate operation covers that case.
3. PEEK is used to view elements at the front of the queue without removing it.
4. So the answer is PEEK.
_Source: syllabus Computer Science, Ch 3 'Stack' and Ch 4 'Queue'_
Keep practising Stacks and Queues
Browse all Stacks and Queues questions for IGNOU MCA, or explore more Computer Science topics.