GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 16 of 255    Print  
What is the output of printf("%d")

  
Total Answers and Comments: 15 Last Update: May 27, 2008   
  
 Sponsored Links



 
 Best Rated Answer
Submitted by: Bharath
 
The output of the printf("%d") is the last entered value enterd through keyboard for any of the C programs as a input, suppose if you enter 50 as input to the any C program and it is the last input, then after executing the printf("%d") you will get 50, anyway 50 is garbage value, but it will prints the last number enterd through keyboard. Check it on Turbo C (I am not sure in VC++)

Above answer was rated as good by the following members:
akshaygs21
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
September 16, 2005 04:23:31   #1  
SONAL        

RE: What is the output of printf("%d")
 Nothing
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
September 21, 2005 03:19:38   #2  
yogeshpanda Member Since: September 2005   Contribution: 50    

RE: What is the output of printf("%d")
1
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
March 17, 2006 02:53:25   #3  
supriya        

RE: What is the output of printf("%d")

  

  The output is 0.


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
April 26, 2006 07:08:48   #4  
raj        

RE: What is the output of printf("%d")
The answer is 0.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
April 27, 2006 09:14:49   #5  
Yashwant Pinge        

RE:
It gives the garbage value ( depends) on compiler.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
November 22, 2006 01:15:51   #6  
DEEPAK KUMAR MAHAPATRA(TCS KOCHI)        

RE: What is the output of printf("%d")

Hii

it is a very simple thing ... the out put will be a garbage value basically win32 and vc++ but depend upon the complier it may give some thing else.

byy

DEEPAK (TCS INFOPARK KOCHI)


 
Is this answer useful? Yes | No
March 30, 2007 06:05:50   #7  
Sumahisri        

RE:
The string %d itself will be printed
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
April 03, 2007 07:31:53   #8  
dasam Member Since: March 2007   Contribution: 33    

RE: What is the output of printf("%d")
garbage value
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
April 21, 2007 14:16:18   #9  
Bharath        

RE: What is the output of printf("%d")
The output of the printf("%d") is the last entered value enterd through keyboard for any of the C programs as a input, suppose if you enter 50 as input to the any C program and it is the last input, then after executing the printf("%d") you will get 50, anyway 50 is garbage value, but it will prints the last number enterd through keyboard. Check it on Turbo C (I am not sure in VC++)
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 22, 2007 04:37:13   #10  
kishore2007 Member Since: April 2007   Contribution: 4    

RE:
In 16-bit  compiler  ,it will  print  zero(0).
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links



 
Sponsored Links

 
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape