108
ICAR JRF 29 Jun 2024Shift 1
MCQ (Single Correct) +4 −1
Suppose a circular queue of capacity (n— 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are:
  • Circular Queue Full and Empty Boundary Conditions:
  • Consider a circular queue of capacity $n - 1$ implemented using an array of size $n$, with index pointers FRONT and REAR:
  • One empty slot is reserved to distinguish between full and empty states.
  • Empty Condition: When no elements reside in the queue:
$$\text{REAR} == \text{FRONT}$$
  • Full Condition: When inserting one more element would advance REAR to meet FRONT:
$$(\text{REAR} + 1) \bmod n == \text{FRONT}$$
  • Conclusion: Full: (REAR+1) mod n == FRONT, empty: REAR == FRONT (Option 1).

Correct option: (1) Full: (REAR+1) mod n == FRONT, empty: REAR == FRONT

Explanation not matching this question? क्या व्याख्या इस प्रश्न से मेल नहीं खा रही? Report
Want to practice this paper in exam conditions? क्या आप परीक्षा जैसे माहौल में अभ्यास करना चाहते हैं? Test yourself in 5-question batch format with timer and hidden answers. 5-प्रश्नों के बैच फॉर्मैट, टाइमर और छिपे उत्तरों के साथ खुद को परखें।
Start Practice Mode → प्रैक्टिस टेस्ट मोड शुरू करें →
Official PYQ Papers

Previous Year Papers of Computer Application

Practice official shift-wise question papers with answer keys and detailed explanations on the actual exam pattern.

1
Total Available Previous Papers

Choose Exam

Exam Directory

Browse official Previous papers and mock tests

10 Major Agriculture Exams Available