C Programming Tutorial

 
 
 
 
#include<conio.h>
#include<stdio.h>
#inclcde<stdlib.h>

struct queue
{
    int i;
    struct queue *back;
};



void cre(void);
void disp(void);
void ins(void);
void del(void);

struct queue front*;
struct queue rear*;
struct queue t*;

void main()
{

    int user;
    clrscr();
    printf(\"\\n\\t 1.CREATE.\");
    printf(\"\\n\\t 2.INSERT.\");
    printf(\"\\n\\t 3.DELETE.\");
    printf(\"\\n\\t 4.DISPLAY.\");
    printf(\"\\n\\t 5.EXIT.\");
    scanf(\"%d\",&user);
    while(user!=5)
    {
        if(user==1)
        {
            cre();
        }
        if(user==2)
        {
            ins();
        }
        if(user==3)
        {
//            del();
        }
        if(user==4)
        {
            disp();
        }
        if(user==5)
        {
            break;
        }
        getch();
    }
    getch();
}

void cre(void)
{
    int i;
    front=(struct queue
    printf(\"\\n\\t ENTER DATA::::\");
    scanf(\"%d\",&front->i);


}

 
 
Didn't find what you were looking for? Find more on simple queue with link list