program program segment for insertion of an


Program: Program segment for insertion of an element into the queue

add(int value)

{

struct queue *new;

new = (struct queue*)malloc(sizeof(queue));

new->value = value; new->next = NULL;

if (front == NULL)

{

queueptr = new;

front = rear = queueptr

}

else

{

rear->next = new;

rear=new;

}

}

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: program program segment for insertion of an
Reference No:- TGS0263945

Expected delivery within 24 Hours