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

Showing Answers 1 - 46 of 46 Answers

supriya

  • Mar 17th, 2006
 

  

  The output is 0.

raj

  • Apr 26th, 2006
 

The answer is 0.

  Was this answer useful?  Yes

Yashwant Pinge

  • Apr 27th, 2006
 

It gives the garbage value ( depends) on compiler.

  Was this answer useful?  Yes

DEEPAK KUMAR MAHAPATRA(TCS KOCHI)

  • Nov 22nd, 2006
 

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)

Sumahisri

  • Mar 30th, 2007
 

The string %d itself will be printed

  Was this answer useful?  Yes

Bharath

  • Apr 21st, 2007
 

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++)

Ashwan

  • Jul 26th, 2007
 

Output : 0

  Was this answer useful?  Yes

arunkmohapatra

  • Aug 10th, 2007
 

Compiler dependent

  Was this answer useful?  Yes

Vic77

  • Jul 5th, 2011
 

It gives the memory location and then stops for your response to click a button by printing "Press any key to continue"

  Was this answer useful?  Yes

utasv chandvaniya

  • Aug 13th, 2011
 

it will print garbage value because it use automatic storage classes(by default) whose default value is garbage value.

  Was this answer useful?  Yes

madhu

  • Aug 22nd, 2011
 

it's not garbage value.it prints nothing just check it once if u have free time.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions