Professional Documents
Culture Documents
Research Faisalabad
Task#2
Write a function for dequeue operation.
C Function:
int dequeue(int data)
{
int data = INT_MIN;
if (isEmpty()) {
return INT_MIN;
}
data = queue[front];
front = (front + 1) % CAPACITY;
size--;
return data;
}
Task#3
Write a function for display of a queue.
C Function:
void display()
{
int i;
Conclusion:
In this lab, I came to know the implementation of queue operation using
linear array and their use such as Enqueue & Dequeue Operations.
I also came to know their working and programming step by step.