how to implement stack operation using singly linked list

Answers were Sorted based on User's Feedback



how to implement stack operation using singly linked list..

Answer / vignesh1988i

we know that stack is a data structure where the
highest priority will be given to the last element that is
pushed inside and the priority will decrease respectively to
the next consecutive elements........ so we are going to
implement in singly list .... so we are going to insert the
node to the left side of a reference node....... operations
performed in stack are : PUSH & POP..... PUSH here means we
are going to insert a element only at last ..... and POP
means displaying the node from first........


thank u

Is This Answer Correct ?    9 Yes 1 No

how to implement stack operation using singly linked list..

Answer / spandana

it is a datastructure which follows the principal of Last
in First order(LIFO) ie last inserted element will be
deleted first.hence both insertions and deletions takes
place at the same end.it can perform 2
operations "PUSH","POP". the special variable used in
stacks is "top"
stacks can be implemented using arrays,linked lists

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

how to execute a program using if else condition and the output should enter number and the number is odd only...

0 Answers  


what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7

4 Answers   TCS,


How do you write a program which produces its own source code as its output?

4 Answers  


write a program to swap bits in a character and return the value prototype of function char fun (char a, charb flag c) where fun returns a char, char a is a the value char b is the bit to be changed and flag c is the bit value for eg: x=fun(45,7,0) since 45 is 0010 0101 and ow x should contain the value 65 (0110 0101)

1 Answers   Bosch, College School Exams Tests,


What is identifier in c?

0 Answers  






What is break in c?

0 Answers  


What is oops c?

0 Answers  


Explain what does the format %10.2 mean when included in a printf statement?

0 Answers  


What is the c value paradox and how is it explained?

0 Answers  


Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me

7 Answers  


Write a c program to print the sizes and ranges of different data types in c?

1 Answers  


What is && in c programming?

0 Answers  


Categories