Traverse the circular Queue by R4R Team

Following is the function that are used to traverse the circular Queue from Front to rear:

program-

int display()
{
int f=first,r=rear;
if(f==-1)
{
printf("Queue is Emptyn");
return 0;
}
printf("Queue is :n");
if(f< =r)
while(f< =r)
{
printf("%d ",circular_queue[f]);
f=f+1;
}
else
while(f< =MAX-1)
{
printf("%d ",circular_queue[f]);
f=f+1;
}
f=0;
while(f< =r)
{
printf("%d ",circular_queue[f]);
f=f+1;
}
}




Leave a Comment:
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!