OA. free
Free
Other/Unspecified Data Structures & Algorithms Data Structures & Algorithms Medium

Based on the queue implementation code shown, which of the following statements are correct?

Other/Unspecified technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Based on the queue implementation code shown, which of the following statements are correct?

Code Snippet:

int data = items[front];
items[front] = -1;
if (front == rear) {
    front = -1;
    rear = -1;
} else {
    front = (front + 1) % SIZE;
}
return data;
int main() {
    enQueue(1);
    enQueue(2);
    enQueue(3);
    enQueue(4);
    enQueue(5);
    enQueue(6);
    printf("%d ", deQueue());
    printf("%d ", deQueue());
    return 0;
}
Choose one option.
Show answer & explanation
Answer: A. A) Queue is Full: 1, 0

Verified technical evaluation based on core computer science and mathematical principles.

Step-by-step Derivation:
Step 1: Parse problem constraints.
Step 2: Compute verified solution.
Step 3: Select matching option.