Please fill C/C++ code in the blank spaces in the following program segments so that adding an item to a circular queue
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Please fill C/C++ code in the blank spaces in the following program segments so that adding an item to a circular queue
Please fill C/C++ code in the blank spaces in the following program segments so that adding an item to a circular queue can be correctly functioned. When you add an element to full circular queue, you must cal . queue_full(rear). When you delete an element to empty circular queue, you must call queue_empty(). element queue[MAX-QUEUE-SIZE]; //MAX-QUEUE-SIZE is the size of the circular queue /* Adding an item to a circular queue */ void addq(int front, int *rear, element item) { (1). if (_(2)){ queue_full(rear); return; } (3) return;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!