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

Answers were Sorted based on User's Feedback



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

Answer / kesavan

It will print the garbage value.

Is This Answer Correct ?    89 Yes 29 No

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

Answer / guest

it is used to print one integer data type value.

Is This Answer Correct ?    90 Yes 46 No

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

Answer / cooooooool bipul

Hey people

It will not give any syntax error more specifically.. it
will not give any type of error..

The output depends on the compiler u r using...
if it is GCC of linux then O/p== garbage value
there are compilers which will give the last integer value
assigned..
example...
i=30;
printf("%d");

will give ouput 30... but for Gcc it will be garbage value.

Is This Answer Correct ?    43 Yes 8 No

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

Answer / vanitha

garbage value

Is This Answer Correct ?    27 Yes 11 No

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

Answer / anand

it will print some value currently on top of the stack

Is This Answer Correct ?    20 Yes 7 No

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

Answer / mohanraj

It will print a garbage value.

Is This Answer Correct ?    25 Yes 13 No

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

Answer / sanjiv

It will give a garbage value. It is tested.

Is This Answer Correct ?    15 Yes 9 No

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

Answer / sid

it will give output "0"

Is This Answer Correct ?    48 Yes 43 No

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

Answer / anzarudeen

garbage value

Is This Answer Correct ?    5 Yes 1 No

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

Answer / narendra

it will print 0

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More C++ General Interview Questions

int main() { int i ,a[i]; i = 0; a[i] = 10; cout<< a[i] << endl; return 0; } What will be output of this program?

11 Answers   HCL, Mphasis,


Can we use resume in error handling i.e. in the catch block

5 Answers   Infosys,


Is map ordered c++?

0 Answers  


Explain the concept of friend function in c++?

0 Answers  


Write a single instruction that will find the remainder of integral division when x is divided by y. Have the answer stored in z.

1 Answers  






What is the use of :: operator in c++?

0 Answers  


What is a v-table?

0 Answers  


Comment on assignment operator in c++.

0 Answers  


What do you mean by inheritance in c++? Explain its types.

0 Answers  


What can I safely assume about the initial values of variables which are not explicitly initialized?

0 Answers  


What is the maximum value of a unsigned char a) 255 b) 256 c) 128

0 Answers  


Write a program in C++ for Fibonacci series

0 Answers   Axtria, ITC Indian Tobacco Company,


Categories