GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Oracle  >  Aptitude
Go To First  |  Previous Question  |  Next Question 
 Aptitude  |  Question 15 of 40    Print  
What is the output of the following C program?
Main()
{
Printf("%c","abcdefgh"[4]);
}


  
Total Answers and Comments: 7 Last Update: February 12, 2007   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: venkat
 
guess varun got it wrong.. 
note that we have a %c and not a %s. 
therefore it has to print only e.

Above answer was rated as good by the following members:
adeshgupta
July 03, 2005 13:03:22   #1  
varun        

RE: What is the output of the following C program?Main(){Printf("%c","abcdefgh"[4]);...
ans:efgh
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
July 29, 2005 05:33:17   #2  
venkat        

RE: What is the output of the following C program?Main(){Printf("%c","abcdefgh"[4]);...
guess varun got it wrong..
note that we have a c and not a s.
therefore it has to print only e.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
November 29, 2005 07:09:51   #3  
iyyswarya        

why should it print only "e"and not "a"or"b"?
why shoul it print only e and not any other variable in the given input?
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 03, 2006 07:37:46   #4  
nilesh        

RE: What is the output of the following C program?
I think the o/p will be e.
 
Is this answer useful? Yes | No
August 14, 2006 03:51:17   #5  
Neo        

RE: What is the output of the following C program?
Assuming that there r no syntax errorsThe o/p will be e
 
Is this answer useful? Yes | No
October 13, 2006 12:32:23   #6  
mahender        

RE: What is the output of the following C program?

The answer is e.


 
Is this answer useful? Yes | No
February 12, 2007 22:40:23   #7  
Raja        

RE: What is the output of the following C program?
e
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape