Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

C program to perform stack operation using singly linked list

Answer Posted / bin fang

And much better and simpler implementation should be like
this:

void Push(int info)
{
node *temp;

temp = (node *)malloc(sizeof(node));
temp->data = info;
temp->next = head;
head = temp;
count++;
}

void Pop(void)
{
node *temp;

temp = head;
head = head->next;
free(temp);
count--;
}

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i want to know the procedure of qualcomm for getting a job through offcampus

2419


Which is the memory area not included in C program? give the reason

1901


What is the value of uninitialized variable in c?

986


Is struct oop?

968


List a few unconditional control statement in c.

932


c program to compute AREA under integral

2345


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1019


Why is c called "mother" language?

1238


Why c language?

1012


Explain can static variables be declared in a header file?

1114


What is a 'null pointer assignment' error?

1172


Which is best book for data structures in c?

1052


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1808


How can I manipulate individual bits?

992


Can a pointer be null?

987