CODING: #include<stdio.h> #include<conio.h> #include<malloc.h> struct stack { int no; struct stack *next; }; struct stack *top=NULL; struct stack *push(struct stack *,int); struct stack *pop(struct stack *); struct stack *update(struct stack *); struct stack *display(struct stack *); int peep(struct stack *); void main() { int val,ch; clrscr(); do { printf("\n\nS E L E C T O P E R A T I O N"); printf("\n1.PUSH"); printf("\n2.POP"); printf("\n3.PEEP"); printf("\n4.UPDATE"); printf("\n5.DISPLAY"); printf("\n6.EXIT"); printf("\nEnter The option:"); scanf("%d",&ch); switch(ch) { case 1: printf("\nEnter the number to be pushed on to the stack:"); scanf("%d",&val); top=push(top,val); break; case 2: top=pop(top); break; case 3: val=peep(top); printf("\nThe value stored at the top of the st...
FOR BEGINNER PROGRAMMER & COMPUTER SCIENCE STUDENTS