diff --git a/queue/C/queue.c b/queue/C/queue.c index 26696743..47349029 100644 --- a/queue/C/queue.c +++ b/queue/C/queue.c @@ -8,22 +8,22 @@ struct queue { // Initialize the queue void init(struct queue *st) { - st->front=0; - st->end=0; + st->front = 0; + st->end = 0; } // Method to check if the queue st is full or empty void check(struct queue *st) { - if(st->front==0 && st->end==0) + if (st->front == 0 && st->end == 0) printf("The queue is empty!!!!\n"); - else if(st->end==10) + else if (st->end==10) printf("The queue is full!!!!\n"); } // Method to insert elements in the queue st void enqueue(struct queue *st, int ele) { check(st); - st->arr[(st->end)++]=ele; + st->arr[(st->end)++] = ele; } // Method to remove first element from the queue st @@ -34,15 +34,15 @@ int dequeue(struct queue *st) { // Method to show elements in the queue st void show(struct queue st) { - for(int i=st.front; i