how to implement stack operation using singly linked list

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is merge sort in c?

725


Explain the meaning of keyword 'extern' in a function declaration.

829


Why is python slower than c?

705


What is array of structure in c?

690


What is the purpose of clrscr () printf () and getch ()?

689






what is the function of pragma directive in c?

748


c language interview questions & answer

1564


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15738


Explain about C function prototype?

702


What does the error 'Null Pointer Assignment' mean and what causes this error?

842


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

764


When is a void pointer used?

766


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

2027


What is C language ?

1624


What is printf () in c?

668