Question: in C please! A. Implement the following functions for manipulating a queue (without actually declaring the queue), based on an array of characters of size

in C please!in C please! A. Implement the following functions for manipulating a queue

A. Implement the following functions for manipulating a queue (without actually declaring the queue), based on an array of characters of size QUEUESZ, where QUEUESZ is a #include value. The name of the queue is your choice. Pick a name. It will be declared in step B. a. Push - adds one element to the end of the queue (accepts a character as input), returns an int: i. -1 if the queue is already full, ii. O if the item was successfully added b. Pull - removes the front element (if it exists) and returns the value: i. NULL if there were no elements (queue was empty) ii. The Front element itself, if there was one c. Front - does NOT remove anything. Returns the value: i. NULL if there are no elements (queue is empty) ii. The front char element if there is one d. is Full - does NOT remove anything. Returns an int: i. -1 if there are no elements (the queue is empty) ii. 1 if the queue is full iii. O for all other cases B. Using the above functions, write a program that: a. Declares the queue with a size of QUEUESZ characters b. Uses your functions above to do the following: i. Accept input characters, 1 at a time until the symbol ^ is input ii. Push each character onto the queue iii. Output the queue (front to end) after all inputs have been received

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!