Vidyalelo
Data Structure · Q72

Stacks in Data Structures

Programming · Data Structure · question 72

Q72

What will be the output of the following program? main() char str[]="hello india"; int len = strlen(str); int i; for(i=0;i<len;i++) push(str[i]); // pushes an element into stack for(i=0;i<len;i++) pop(); //pops an element from the stack

A.
helloindia
B.
hello india
C.
aidni olleh
Answer
D.
india hello

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board