program gives the program segment by using arrays


Program gives the program segment by using arrays for the insertion of an element to a queue into the multiqueue.

Program: Program segment for the insertion of any element to the queue

addmq(i,x) /* Add x to queue i */

{

int i,x;

++rear[i];

if ( rear[i] == front[i+1])

printf("Queue is full");

else

{

rear[i] = rear[i]+1;

mqueue[rear[i]] = x;

}

}

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: program gives the program segment by using arrays
Reference No:- TGS0413482

Expected delivery within 24 Hours