#include<stdio.h>
#include<malloc.h>
struct node
{
int info;
struct node *link;
}*top;
void push(int val)
{
struct node *p;
p=(struct node*)malloc(sizeof(struct node));
p<--info=val;
p<--link=top;
top=p;
return;
}
int pop()
{
int val;
if(top!=NULL)
{
val=top<--info;
top=top<--link;
return val;
}
else
{
printf(“Stack Underflow”);
return -1;
}
}