Home
SELF STUDY
BrowsePracticeTestsPlaylistDoubts & solutionsFree live classesOther courses

C Programming

Quick practice

Question 1 of 5

Consider the following pseudocode that uses a stack declare a stack of characters

while ( there are more characters in the word to read )


{

read a character

push the character on the stack

}

while ( the stack is not empty )

{

pop a character off the stack write the character to the screen

}


What is the output for input “gate2022”?

A

gate2022

B

2202etag2

C

gate2022gate2022

D

2202etag

Get unlimited practice with GATE - CSIT, DSAI & Interview Preparation subscription

pick

Boost your performance with adaptive practice tests

pick

Practice every concept in the syllabus

pick

Compare your speed and accuracy with your peers

pick

Download the app and practice on the go