Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
LLSTACK

LLSTACK

Ratings: (0)|Views: 8|Likes:
Published by shameedp

More info:

Published by: shameedp on Sep 14, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

06/16/2009

pdf

text

original

 
STACK IMPLEMENTATION USING LINKED LIST
#include<stdio.h>#include<conio.h>#include<stdl ib.h>struct node{int data;struct node*l ink;};struct node*top=NULL,*temp;void main(){int ch,data;clrscr();while(1){printf("\nThe Possible operations are");printf("\n1.Push\t2.Pop\t3.Display\t4.Exit");printf("\nEnter your choice ->");scanf("%d",&ch);switch(ch){case 1:temp=(struct node*)malloc(sizeof(struct node));printf("\nEnter the node data:");scanf("%d",&data);temp->data=data;temp->link=top;top=temp;break;case 2:i f(top!=NULL){printf("\nThe poped element is %d",top->data);top=top->link;}
1
|
Pa g e S t a c k L L - C o d i n g

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->