748 views
2 votes
2 votes
Let S be a stack with operations push, pop, top, empty. What is displayed after following segment of code executes .

                               for(i=1; i<=5; i++)

                               s.push(i);

                               while(!s.empty())

                               printf("%d", s.top());

ans with explanation

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
1
amit166 asked Aug 8, 2018
860 views
pseudo code of stackdeclare a stack of characterswhile (there are more character in the word to read){read a character push the character on the stack}while(the stack i...