Course Solutions Uncategorized (Solved) : Need Program C Language Using Queue Linked List Shows Real Life Application Example Queing Q27383421 . . . .

(Solved) : Need Program C Language Using Queue Linked List Shows Real Life Application Example Queing Q27383421 . . . .

 

I need a program in C language using queue with linked list thatshows real life application for example queing for train ticket .This is queue using array instead of linked list . can someone doit using linked list . Only in C please thanks !

#include<stdio.h>

#include<string.h>

struct reserve

{

  

struct passenger

  

{

  

int seatno,age;

  

char na[15];

  

}p[10][5];

  

struct detail

  

{

  

int h,t,count,sr;

  

}d[10];

  

}r;

void c_reserve()

{

  

for(int v=0;v<10;v++)

  

{

  

r.d[v].count=0;

  

r.d[v].h=0;

  

r.d[v].sr=0;

  

r.d[v].t=-1;

  

}

  

}

int isqueueempty(int n3)

{

  

return(r.d[n3].count==0?1:0);

  

}

int isqueuefull(int n3)

{

  

return(r.d[n3].count==(3+r.d[n3].sr)?1:0);

  

}

void disp()

{

  

printf(“1.SEDHU EXPRESS FROM:KL TO: IPOHn”);

  

printf(“2.BAGATH EXPRESS FROM:TAIPEI TO: KLn”);

  

printf(“3.HOWRAH EXPRESS FROM:BATU GAJAH TO: KLn”);

  

printf(“4.RAJDHANI EXPRESS FROM:KL TO: SUNGAI PETANIn”);

  

printf(“5.PANDIAN EXPRESS FROM:KL TO: BUTTERWORTHn”);

  

printf(“——Enter your choice—–n”);

  

}

int enqueue(int t1)

{

  

int i,m1,s,g,u;

  

char ch,ch1;

  

if(t1==-1)

  

{

  

disp();

  

printf(“Enter the row which is to be enqueued:”);

  

scanf(“%d”,&i);

  

i=i-1;

  

m1=i;

  

t1++;

  

}

  

else

  

{

  

m1=t1;

  

i=5;

  

}

  

s=t1+i;

  

u=5+t1;

  

if(r.d[s].sr<2)

  

{

  

printf(“Do you belong to special reservation category say

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post