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

Answers were Sorted based on User's Feedback



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

Answer / arnab kuamr mahapatra

it will print a garbage value
that means default value an integer

Is This Answer Correct ?    1 Yes 0 No

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

Answer / soundar

it will display only garbage value

Is This Answer Correct ?    10 Yes 10 No

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

Answer / ashif ali

it will display only garbage value because
int a=12;
printf("%d");
output=12

Is This Answer Correct ?    8 Yes 8 No

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

Answer / keshav.gadde

The output is 0

Is This Answer Correct ?    9 Yes 9 No

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

Answer / saranya

IT will print a warning only. So the output will be some
garbage value.

Is This Answer Correct ?    1 Yes 1 No

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

Answer / beloshe vinod

Output will depends on number of values(local variables)
pushed onto stack .Out of that top of stack will gets printed
e.g.
static int a=89;
int b=67;
printf("%d");

will result in :> 67

Is This Answer Correct ?    2 Yes 2 No

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

Answer / vijay kumar cet bikaner 1st y

the output of printf("%d") is 0 beacause machine dureng the
execution of program has no address in the memory location
then it goes to the starting point then it print out the
value 0 .....

Is This Answer Correct ?    1 Yes 1 No

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

Answer / vinod

It prints the value in the stack.That means the if there is
previous initialisation of values.If there are no
definitions of integer varaibles,it would display the
garbage value.

Is This Answer Correct ?    1 Yes 1 No

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

Answer / narendra singh

ans.is
get ans zero

Is This Answer Correct ?    0 Yes 0 No

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

Answer / sonu

The Output is 0.rite now run and check answer. thats right
answer.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is the array and initializing arrays in c++?

0 Answers  


What is #include iostream in c++?

0 Answers  


What is scope operator in c++?

0 Answers  


What is class invariant in c++?

0 Answers  


What is c++ redistributable?

0 Answers  






How many types of classes are there in c++?

0 Answers  


Difference between overloading vs. Overriding

0 Answers  


What is the output of this prog. ? struct A { A(){ cout << \"A\"; } }; struct B { B(){ cout << \"B\"; } }; struct C { C(){ cout << \"C\"; } }; struct D { D(){ cout << \"D\"; } }; struct E : D { E(){ cout << \"E\"; } }; struct F : A, B { C c; D d; E e; F() : B(), A(),d(),c(),e() { cout << \"F\"; } };

2 Answers  


What is DlgProc?

0 Answers   C DAC,


How to write a program such that it will delete itself after exectution?

3 Answers  


Profiler in projects?

2 Answers   Symphony,


What is a constructor in c++ with example?

0 Answers  


Categories