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

. Explain the differences between fork() and exec() in C

2 Answers  


Can you pass an entire structure to functions?

0 Answers  


How do I declare a pointer to an array?

6 Answers   IBM,


is c language is a object oreinted language?

5 Answers   TCS,


hOW Can I add character in to pointer array of characters char *a="indian"; ie I want to add google after indian in the char *a

1 Answers  


What is the right way to use errno?

0 Answers  


What is this infamous null pointer, anyway?

0 Answers  


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

1 Answers  


Write a program to find the biggest number of three numbers in c?

0 Answers  


What is fflush() function?

0 Answers  


What is type qualifiers?

0 Answers  


How can a process change an environment variable in its caller?

0 Answers  


Categories