What will be the output of the following program? [code] main() { char str[]="san foundry"; int len = strlen(str); int

What will be the output of the following program?
Code:
main()  
{  
   char str[]="san foundry";  
   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. sanfoundry
B. san foundry
C. yrdnuof nas
D. foundry nas
 

Tìm kiếm

Back
Top