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

Answers were Sorted based on User's Feedback



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

Answer / apoorv

it will be give u garbage value....u can't be sure for d
value....
its depend on d complier which value he read recently...
and it will be a garbage....according to d programer...bcoz
he don,t knw which value has been recentyly read by d
compiler...!!

Is This Answer Correct ?    0 Yes 0 No

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

Answer / dipanjan m

it will print garbage value

Is This Answer Correct ?    0 Yes 0 No

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

Answer / wakil sheikh

output will be 0

Is This Answer Correct ?    0 Yes 0 No

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

Answer / shakti singh khinchi

It will print garbage value & gives warning on compilation
like "too few arguments for format".

Is This Answer Correct ?    0 Yes 0 No

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

Answer / sudha

it will simply print a garbage value..........

Is This Answer Correct ?    0 Yes 0 No

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

Answer / bheda govind

printf("%d") THAN

OUTPUT IS----0(ZIRO)

Is This Answer Correct ?    0 Yes 0 No

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

Answer / rahul raj

It will not compile..

Is This Answer Correct ?    0 Yes 0 No

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

Answer / snigdhadeb

printf("%d");
will gives the answer 0....

Is This Answer Correct ?    0 Yes 0 No

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

Answer / vaisakh.r

printf("%d") will printf some garbage value since there is no varible specified in it.so compiler check the argument stack check offset depending on the format specifier print whats on that location, since we can't sure about that value say it will print some garbage value

Is This Answer Correct ?    0 Yes 0 No

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

Answer / baban dongare

It will generate the garbage value..

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

0 Answers  


How does java differ from c and c++?

0 Answers  


What is c++ used for in games?

0 Answers  


Define what is constructor?

0 Answers  


What is the main purpose of c++?

0 Answers  






What is the basic of c++?

0 Answers  


why all c++ program must have default constructor?

6 Answers   IBM,


Consider the following code fragment: int main(void) { int m = 4; mystery ( m ); mystery ( m ); printf("%d", m); return 0; } What is the output on the monitor if mystery is defined as follows ? void mystery (int m) { m = m+3; }

2 Answers   CDAC, Wipro,


What is the latest c++ standard?

0 Answers  


How much is size of struct having 1 char & 1 integer?

11 Answers   Persistent,


why the size of an empty class is 1

4 Answers  


How can you tell what shell you are running on unix system?

0 Answers  


Categories