Queue_Implementation
Queue_Implementation
h> //The standard input library header file, without this you
cannot make you of the 'main' function below"
#include <stdbool.h> //The header file library that allows us to use the "bool"
(for Boolean) declarator
typedef struct {
int elements[MAX_LENGTH]; //The actually queue of the structure
int head; //The head of the queue
int tail; //The tail of the queue
}Queue;
int main() {
Queue my_queue = {.elements = {}, .tail = MAX_LENGTH, .head = MAX_LENGTH};
enqueue(&my_queue, 0);
enqueue(&my_queue, 2);
enqueue(&my_queue, 4);
dequeue(&my_queue);
}