[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Program Discussion :: Stack

Home > Programs > Stack

88 / 5

Write a push() and pop() implementation using linked list in C.

Answer:

#include 
#include 
#include 
using namespace std;
struct node
{
    int info;
    struct node *ptr;
}*top,*top1,*temp;
void push(int data);
void pop();
void create();
int count = 0;
void main()
{
    int no, ch, e;
    coutinfo);
    free(top);
    top = top1;
    count--;
}

Asked In :: PEOL

Post Your Answer Here:

Language:

Post Your Reply Here:



Language:

Post Your Reply Here: