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
i want to know the procedure of qualcomm for getting a job through offcampus
Which is the memory area not included in C program? give the reason
What is the value of uninitialized variable in c?
Is struct oop?
List a few unconditional control statement in c.
c program to compute AREA under integral
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
Why is c called "mother" language?
Why c language?
Explain can static variables be declared in a header file?
What is a 'null pointer assignment' error?
Which is best book for data structures in c?
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.
How can I manipulate individual bits?
Can a pointer be null?