| 59 | } |
| 60 | |
| 61 | void Print() |
| 62 | { |
| 63 | int i; |
| 64 | |
| 65 | if (IsEmpty()) |
| 66 | { |
| 67 | printf(" \n Empty Queue\n"); |
| 68 | } |
| 69 | else |
| 70 | { |
| 71 | printf("\n Front -> %d ", front); |
| 72 | printf("\n Items -> "); |
| 73 | for (i = front; i != rear; i = (i + 1) % SIZE) |
| 74 | { |
| 75 | printf("%d ", queue[i]); |
| 76 | } |
| 77 | printf("%d ", queue[i]); |
| 78 | printf("\n Rear -> %d\n", rear); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | int Front() |
| 83 | { |