# data[].attributes.body
#include<iostream.h> using namespace std; struct QUEUE{ string data; QUEUE * next; }; QUEUE *frontptr, *rearptr; void ciptaqueuekosong(); void enqueue(string); void dequeue(); int main(){ ciptaqueuekosong(); enqueue("siti,3.5"); enqueue("lay,3.7"); enqueue("rahim,3.9"); dequeue(); } void ciptaqueuekosong(){ frontptr = rearptr= NULL; } void enqueue(string val){ QUEUE * newptr; newptr = new QUEUE; newptr->data = val; newptr->next = NULL; if (rearptr == NULL) rearptr=frontptr= newptr; else{ newptr->next=rearptr; rearptr=newptr; } cout<<rearptr->data<<" "; } void dequeue(){ QUEUE *temptr; if (frontptr== NULL) cout<< "empty queue"; else{ temptr = frontptr; frontptr= frontptr->next; delete temptr; } } void removeALL(){ while (frontptr!=NULL) dequeue(); }

# data[].attributes.body
#include<iostream.h>
struct QUEUE{

int data;

QUEUE * next;

};

QUEUE *frontptr, *rearptr;

void ciptaqueuekosong();

void enqueue(int,String);

void dequeue();

void removeALL();

int main(){

ciptaqueuekosong();

enqueue(15,"sabri");

enqueue(16,"irfan");

enqueue(17,"dila");

dequeue();

removeALL();

}

void ciptaqueuekosong(){

frontptr = rearptr= NULL;

}

void enqueue(int val, String name){

QUEUE * newptr;

newptr = new QUEUE;

newptr->data = val;

newptr->next = NULL;

if (rearptr == NULL)

rearptr=frontptr= newptr;

else{

newptr ->next = rearptr;

rearptr = newptr;

}

cout<<rearptr->data<<" ";

}

void dequeue(){

QUEUE *temptr;

if (frontptr== NULL)

cout<< "empty queue";

else{

temptr = frontptr;

frontptr= frontptr->next;

delete temptr;

}

}

void removeALL(){

while (frontptr!= NULL)

dequeue();

}

# data[].attributes.body
#include<iostream.h>

#include<string.h>

struct QUEUE{
int data;
QUEUE *next;
};
QUEUE *frontptr, *rearptr;
void ciptaqueuekosong();
void enqueue(string);
void dequeue();
void removeALL();
int main(){
ciptaqueuekosong();
enqueue(Siti, 3.5);
enqueue(Lay,3.7);
enqueue(Rahim,3.9);
dequeue();
removeALL();
}
void ciptaqueuekosong(){
frontptr=rearptr=NULL;
}
void enqueue(int val){
QUEUE *newptr;
newptr=new QUEUE;
newptr->data=val;
newptr->next=NULL;
if (rearptr == NULL)
rearptr = frontptr = newptr;
else{
newptr->next=rearptr;
rearptr=newptr;
}
cout<<rearptr->data<<" ";
}
void dequeue(){
QUEUE *temptr;
if (frontptr== NULL)
cout<<"empty Queue";
else{
temptr = frontptr;
frontptr = frontptr-> next;
delete temptr;
}
}
void removeAll(){
while (frontptr!=NULL)
dequeue();
}

# data[].attributes.headline
SOALAN DATA PELAJAR ( NOR AZRIL BT MOHD GHAZALI  D067981 & NURAINI BT MOHD RANI D067989

# data[].attributes.subject
SOALAN DATA PELAJAR ( NOR AZRIL BT MOHD GHAZALI  D067981 & NURAINI BT MOHD RANI D067989

# data[].attributes.body
#include<iostream>
using namespace std;

struct QUEUE{

string data;

QUEUE * next;

};

QUEUE *frontptr, *rearptr;

void ciptaqueuekosong();

void enqueue(string);

void dequeue();

void removeALL();

int main(){

ciptaqueuekosong();

enqueue("DATA PELAJAR");

enqueue(" MILA ");
enqueue("3.5");
enqueue("pandai");
enqueue("anak saya");
enqueue("siapa saya tu" );
dequeue();

}
void ciptaqueuekosong(){

frontptr = rearptr= NULL;

}

void enqueue( string val){

QUEUE * newptr;

newptr = new QUEUE;

newptr->data = val;

newptr->next = NULL;

if (rearptr == NULL)

rearptr=frontptr= newptr;

else{

newptr ->next = rearptr;

rearptr = newptr;

}

cout<<rearptr->data<<" " <<endl;

}

void dequeue(){

QUEUE *temptr;

if (frontptr== NULL)

cout<< "empty queue";

else{

temptr = frontptr;

frontptr= frontptr->next;

delete temptr;

}

}

void removeALL(){

while (frontptr!= NULL)

dequeue();

}

# data[].attributes.body
#include<iostream.h> using namespace std; struct QUEUE{ int data; QUEUE * next; }; QUEUE *frontptr, *rearptr; void ciptaqueuekosong(); void enqueue(int); void dequeue(); int main(){ ciptaqueuekosong(); enqueue(15); enqueue(16); enqueue(17); dequeue(); } void ciptaqueuekosong(){ frontptr = rearptr= NULL; } void enqueue(int val){ QUEUE * newptr; newptr = new QUEUE; newptr->data = val; newptr->next = NULL; if (rearptr == NULL) rearptr=frontptr= newptr; else{ newptr->next=rearptr; rearptr=newptr; } cout<<rearptr->data<<" "; } void dequeue(){ QUEUE *temptr; if (frontptr== NULL) cout<< "empty queue"; else{ temptr = frontptr; frontptr= frontptr->next; delete temptr; } } void removeALL(){ while (frontptr!=NULL) dequeue(); }

# data[].attributes.body
#include<iostream.h> using namespace std; struct QUEUE{ int data; QUEUE * next; }; QUEUE *frontptr, *rearptr; void ciptaqueuekosong(); void enqueue(int); void dequeue(); int main(){ ciptaqueuekosong(); enqueue(15); enqueue(16); enqueue(17); dequeue(); } void ciptaqueuekosong(){ frontptr = rearptr= NULL; } void enqueue(int val){ QUEUE * newptr; newptr = new QUEUE; newptr->data = val; newptr->next = NULL; if (rearptr == NULL) rearptr=frontptr= newptr; else{ newptr->next=rearptr; rearptr=newptr; } cout<<rearptr->data<<" "; } void dequeue(){ QUEUE *temptr; if (frontptr== NULL) cout<< "empty queue"; else{ temptr = frontptr; frontptr= frontptr->next; delete temptr; } }

# data[].attributes.body
#include<iostream.h> using namespace std; struct QUEUE{ int data; QUEUE * next; }; QUEUE *frontptr, *rearptr; void ciptaqueuekosong(); void enqueue(int); void dequeue(); int main(){ ciptaqueuekosong(); enqueue(15); enqueue(16); enqueue(17); } void ciptaqueuekosong(){ frontptr = rearptr= NULL; } void enqueue(int val){ QUEUE * newptr; newptr = new QUEUE; newptr->data = val; newptr->next = NULL; if (rearptr == NULL) rearptr=frontptr= newptr; else{ newptr->next=rearptr; rearptr=newptr; } cout<<rearptr->data<<" "; }

# data[].attributes.body
struct QUEUE{

int data;

QUEUE * next;

};

QUEUE *frontptr, *rearptr;

void ciptaqueuekosong();

void enqueue(int );

void dequeue();

void removeALL();

int main(){

ciptaqueuekosong();

enqueue(15);

enqueue(16);

enqueue(17);

dequeue();

removeALL();

}

void ciptaqueuekosong(){

frontptr = rearptr= NULL;

}

void enqueue(int val){

QUEUE * newptr;

newptr = new QUEUE;

newptr->data = val;

newptr->next = NULL;

if (rearptr == NULL)

rearptr=frontptr= newptr;

else{

newptr ->next = rearptr;

rearptr = newptr;

}

cout<<rearptr->data<<" ";

}

void dequeue(){

QUEUE *temptr;

if (frontptr== NULL)

cout<< "empty queue";

else{

temptr = frontptr;

frontptr= frontptr->next;

delete temptr;

}

}

void removeALL(){

while (frontptr!= NULL)

dequeue();

}