Queues in C Programming Language
ฝัง
- เผยแพร่เมื่อ 26 ส.ค. 2024
- In this video, we will show you the working of the Queue Data structures. Moreover, we demonstrated the implementation of queues in the C programming language.
#C #C_Programming #LinuxHint #Queues #Data_Structures
Best video i seen to learn queue ,Hope all the videos will be in same level ,All the best
can you explain the row code number 34 and 35 slowly and clearly?
amazing
Hi! BSIT-2A
i love you
#include
#define SIZE 6
int q[SIZE];
int front = -1;
int rear = -1;
void insert(int);
void delete();
void display();
void insert(int x){
if(rear == SIZE -1){
printf("
OVERFLOW");
}
else if(front ==-1){
front = 0;
rear ++;
q[rear]= x;
printf("
INSERTED ITEMS :%d",x);
}
}
void delete(){
if (front == -1){
printf("
UNDERFLOW");
}
else if(front>rear){
front++;
front= rear-1;
printf("DELETED : %d",q[front]);
}
}
void display(){
int i;
if(front == -1){
printf("
EMPTY");
}
else{
for(i=front;i++;i