4 queue
1 #include<stdio.h>
2 #include<conio.h>
3 void main()
4 {
5 int queue[5],i;
6 int *head,*tail;
7 head=queue;
8 tail=queue;
9 clrscr();
10 printf("Enter the elments in the queue:");
11 for(i=0;i<5;i++)
12 {
13 scanf("%d",tail++);
14 }
15
16 printf("The address associated with those elments in the queue
are:-");
17 for ( i = 0; i < 5; i++)
18 {
19
20 printf("\n%d is at %u",*head,head);
21 head++;
22 }
23 getch();
24
25 }
OUTPUT
Enter the elments in the queue: 1 2 3 4 5
The address associated with those elments in the queue are:-
1 is at 6422272
2 is at 6422276
3 is at 6422280
4 is at 6422284
5 is at 6422288