test for overflow which occurs when the queue is full, signified by front = rear

if((*pq).rear ==  (*pq).front)

printf("\n overflow \n");