A program stores positive integers in a circular queue. The queue is stored as a global 1D array of 20 integers with the identifier queue. Each index is initialised with the data -1 The global variable HeadPointer, initialised to -1 , points to the first element in the queue. The global variable TailPointer, initialised to -1 , points to the last element in the queue. The global variable NumberItems, initialised to 0 , stores the number of items in the queue. The function Enqueue ( ) : - takes an integer as a parameter - checks if the queue is full - returns FALSE if the queue is full - stores the parameter in the next position in the queue and returns TRUE if the queue is not full - updates the appropriate pointers and Number Items Write program code for Enqueue ( )

Computer Science
IGCSE&ALevel
CAIE
Exam No:9618_s25_qp_41 Year:2025 Question No:1(b)

Answer:







Knowledge points:

19.1 Algorithms

Solution:

Download APP for more features
1. Tons of answers.
2. Smarter Al tools enhance your learning journey.
IOS
Download
Android
Download
Google Play
Download