How do I return the front element of queue struct Link TYP
How do I return the front element of queue ?
struct Link {
TYPE val;
struct Link *next;
};
struct ListQueue {
struct Link *head;
struct Link *tail;
};
TYPE frontListQueue (struct ListQueue *q) {
}
Solution
Answer:
We can return the front element of queue as : -
VAR=q--->data
q=q--->next
Struct ListQueue x
X--->head=q
Return var
