diff --git a/C/Reverse n elements of a given queue.c b/C/Reverse n elements of a given queue.c new file mode 100644 index 0000000..fbf29e0 --- /dev/null +++ b/C/Reverse n elements of a given queue.c @@ -0,0 +1,40 @@ +/* +int front=-1, rear=-1; +int array[SIZE]; +void enqueue(int item); +int dequeue(); + +Above variables are used for queue, SIZE, front and rear and all are global variables. Complete the below two methods. */ +#include +static int check=1,l=1; +void reverseQueue(int q[]) +{ + if(front