queue operations using linked list | The Code Cracker
http://thecodecracker.com/c-programming/queue-operations-using-link...
queue operations using linked list
SEARCH
Search
RSS Feed
Java Programming Courses
NIIT.com/Java-Training NIIT Offers Java Courses. Fast Track Career Programs. Enroll Now!
Facebook Google+
Average blog rating:
1519 votes cast for 109 posts
C program for queue operations using linked list.
TAGS
Arithmetic Operations
#include<stdio.h> #include<malloc.h> #define MAXSIZE 10 void insertion(); void deletion(); void display(); struct node { int info; struct node *link; }*new,*temp,*p,*front=NULL,*rear=NULL; typedef struct node N; main() { int ch;
Armstrong Number
Array
Arrays and Pointers
bash script Basics
Basics in Shell Programming
binary search tree
Call By Reference
Call By Value Data Structure and Algorithm
Data
12/24/2012 5:22 PM
1 of 7
queue operations using linked list | The Code Cracker
http://thecodecracker.com/c-programming/queue-operations-using-link...
do { printf("\n\t\t\tLinked queue"); printf("\n 1.Insertion");
PAGES Codes C Programs C++ Programs Python Programs Shell Scripts Contact us Blog
Structure and Algorithms
decimal to binary
printf("\n 2.Deletion"); printf("\n 3.Display"); printf("\n 4.Exit"); printf("\n Enter your choice : "); scanf("%d",&ch); switch(ch) { case 1:
Dynamic Memory Allocation
Fibonacci Series friend function
Graph
Hashing
insertion();
CATEGORIES C Programming (121) C++ (6) Data Structures Python (6) Shell Scripting (16) Sorting (2) System Programming (4) (5)
Implementation of Pointers
Infix Expression Evaluation
break; case 2: deletion(); break; case 3: display(); break; default: break; } }while(ch<=3); } void insertion() { int item; new=(N*)malloc(sizeof(N)); printf("\nEnter the item : "); scanf("%d",&item); new->info=item; new->link=NULL; if(front==NULL)
inheritance
Introductory Programs leap
year program in c leap year program logic
Linked List Matrix
Miscellaneous Operations
odd or even
Pointers
Pointer to Structure Prims
Algorithm
Python
Python GUI
Queue Shell
Operations Shell Sort
Sorting Stack
stack using array stack
using linked list
String and Pointers String
2 of 7
12/24/2012 5:22 PM
queue operations using linked list | The Code Cracker
http://thecodecracker.com/c-programming/queue-operations-using-link...
front=new; else
PAGES Codes C Programs C++ Programs Python Programs Shell Scripts Contact us Blog
in Shell Scripting Structures
rear->link=new; rear=new; } void deletion() { if(front==NULL) printf("\nQueue is empty");
Tkinter Tree
CATEGORIES
else
C Programming (121) C++ (6) Data Structures Python (6) Shell Scripting (16) Sorting (2) System Programming (4) (5)
{ p=front; printf("\nDeleted element is : %d",p->info); front=front->link; free(p); } } void display() { if(front==NULL) printf("\nQueue is empty"); else { printf("\nThe elements are : "); temp=front; while(temp!=NULL) { printf("%d",temp->info); temp=temp->link; }
RECENT COMMENTS nalsaamu on implementation of stack using array deebalakshmi on C Program of Double Linked List theang on Program to find Mean,Median,and
3 of 7
12/24/2012 5:22 PM
queue operations using linked list | The Code Cracker
http://thecodecracker.com/c-programming/queue-operations-using-link...
} }
PAGES Codes C Programs C++ Programs Python Programs Shell Scripts Contact us Blog Rating: 8.6/10 (57 votes cast) Rating: +22 (from 34 votes) CATEGORIES C Programming (121) C++ (6) Data Structures Python (6) Shell Scripting (16) Sorting (2) System Programming (4) (5)
Mode sysabod on Best method to find biggest of 3 numbers rajat on queue operations using linked list
Keys : linked list, queue, queue operations using linked list, queue using linked list, "c linked" list introduction, linked implimentation of stack in c language, program of implimentation of stack in linked lists in c language, singile linkedlists in c, single linkedlists in c, c linked list.
queue operations using linked list, 8.6 out of 10 based on 57 ratings
Share this:
Related posts:
1. Implementation of stack using linked list
10. April 2008 by Jishnu Categories: C Programming | Tags: Linked List, Queue, queue using linked list | 9 comments
Comments (9)
surendra dhobale says April 5, 2010 at 5:55 pm
Mistake in code in insertion function if front==NULL with front=p rear also assign to p; else wrong output means if(front==NULL)
4 of 7
12/24/2012 5:22 PM
queue operations using linked list | The Code Cracker
http://thecodecracker.com/c-programming/queue-operations-using-link...
{ front=p; rear=p }
PAGES Codes C Programs C++ Programs Python Programs Shell Scripts Contact us Blog keivan says April 13, 2010 at 1:21 am Mahesh says April 7, 2010 at 2:21 pm
it is dealt with at the end already. See the program closely. Its correct.
CATEGORIES C Programming (121) C++ (6) Data Structures Python (6) Shell Scripting (16) Sorting (2) System Programming (4) (5)
its very good & tanx for your nice web
Selva ganapathi says December 9, 2010 at 10:43 am
Its very useful to all.
Domkal says August 4, 2011 at 2:59 pm
isnt this suppose to be for stack implementation? Last in First out???
Arka Halder says November 1, 2011 at 9:23 pm
I had a few errors running this program on my pc..heres the corrected code with a few corrections from my side.. #include #include #define MAXSIZE 10 void insertion(); void deletion(); void display(); typedef struct node { int info; node *link; }N; N *new1,*temp,*p,*front=NULL,*rear=NULL; void main() {
5 of 7
12/24/2012 5:22 PM
queue operations using linked list | The Code Cracker
http://thecodecracker.com/c-programming/queue-operations-using-link...
PAGES Codes C Programs C++ Programs Python Programs Shell Scripts Contact us Blog
CATEGORIES C Programming (121) C++ (6) Data Structures Python (6) Shell Scripting (16) Sorting (2) System Programming (4) (5)
int ch; do { printf(\n Enter your choice : ); printf(1.Insertion 2.Deletion 3.Display 4.Exit); scanf(%d,&ch); switch(ch) { case 1:insertion();break; case 2:deletion();break; case 3:display();break; case 4: default:break; } }while(chinfo=item; new1->link=NULL; if(front==NULL) front=new1; else rear->link=new1; rear=new1; } void deletion() { if(front==NULL) printf(\nQueue is empty); else { p=front; printf(\nDeleted element is : %d,p->info); front=front->link; free(p); } } void display() { if(front==NULL) printf(\nQueue is empty); else { printf(\nThe elements are : ); temp=front; while(temp!=NULL) { printf(%d ,temp->info); temp=temp->link; } } }
PAYAL says November 10, 2011 at 7:41 pm
6 of 7
12/24/2012 5:22 PM
queue operations using linked list | The Code Cracker
http://thecodecracker.com/c-programming/queue-operations-using-link...
i am very thankful 2 u for this program. u r very good programmer this program is very easy to understand. thanks.
PAGES Codes C Programs C++ Programs Python Programs Shell Scripts Contact us Blog Dharmendra says December 21, 2011 at 11:15 pm
thanxx dude, very very THANK U, tomorrow my practical exams of Data Structures & Algo. (DSA), i get my problems solution here so ONCE MORE THANKSSSSSSSSS
rajat says September 8, 2012 at 12:53 am CATEGORIES C Programming (121) C++ (6) Data Structures Python (6) Shell Scripting (16) Sorting (2) System Programming (4) (5)
this site provides me excellent codes with good logic
Leave a Reply
Previous Post
Next Post
2012 The Code Cracker. Modified Ari theme. Proudly powered by WordPress.
7 of 7
12/24/2012 5:22 PM