MCPcopy Create free account
hub / github.com/Lakhankumawat/LearnCPP / Insert

Function Insert

Q-Queue/QueueUsingLinkedList.cpp:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8struct node *rear=NULL;
9
10void Insert(){int item;
11struct node *newNode;
12newNode= (struct node *)malloc(sizeof(struct node));
13cout<<"Insert item in the queue"<<endl;
14cin>>item;
15newNode ->data=item;
16newNode ->next=NULL;
17if((front==NULL) && (rear==NULL))
18{
19 front = rear = newNode;
20 return;
21}
22rear->next=newNode;
23rear= newNode;
24
25}}
26
27
28void Delete(){

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected