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

What is the difference between passing by reference and passing a reference?

0 Answers  


How does the copy constructor differ from the assignment operator (=)?

0 Answers  


Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?

0 Answers  


When you overload member functions, in what ways must they differ?

0 Answers  


What is the c++ programming language used for?

0 Answers  






Explain the concept of memory leak?

0 Answers  


How do I use arrays in c++?

0 Answers  


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

0 Answers   Yahoo,


Can you please explain the difference between static and dynamic binding of functions?

0 Answers  


What is function prototyping? What are its advantages?

0 Answers  


What is increment operator in c++?

0 Answers  


What is a pure virtual function? Why is it represented as = 0...how is the internal implementation for the same

3 Answers   CTS,


Categories