#include #include #define SZ 7 int queue[SZ]; int front = 0; int rear = 0; int isEmpty() { return (rear == front); } int isFull() { return ((rear + 1) % SZ == front); } int deque() { if (isEmpty() == 1) { return -999; } int temp = queue[front]; front = (front + 1) % SZ; return temp; } void enque(int n) { int if100 = 0; if (isFull() == 1) { return; } if (n == 100) { while (isEmpty() == 0) { if100..
#include #include #define SZ 5 int queue[SZ]; int front = 0; int rear = 0; int isEmpty() { return (rear == front); } int isFull() { return ((rear + 1) % SZ == front); } void enque(int n) { if (isFull() == 1) { return; } queue[rear] = n; rear = (rear + 1) % SZ; return; } int deque() { if (isEmpty() == 1) { return -999; } int temp = queue[front]; front = (front + 1) % SZ; return temp; } int main(v..