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

Answers were Sorted based on User's Feedback



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

Answer / nagaraj

This will give garbage value.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / vijay

it will print the recently assigned integer value.....

Is This Answer Correct ?    1 Yes 2 No

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

Answer / hardik jasani

void main()
{
printf("%d");
}
getch();

Output:0

Is This Answer Correct ?    0 Yes 1 No

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

Answer / sathya

it is the integer in decimal form..
#include<stdio.h>
main()
{
int sum;
sum=6+3;
printf("%d\n",sum);
}

Is This Answer Correct ?    2 Yes 4 No

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

Answer / creed

When insufficent argumrnts r give 2 c compiler it give
arbitrary answers
in turbo c it gives o/p =0
in other compiler it trys 2 read values from last stack top
i.e garbage
some compiler can may even crash

Is This Answer Correct ?    3 Yes 7 No

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

Answer / shruthi

the o/p is 0.

Is This Answer Correct ?    7 Yes 11 No

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

Answer / uma sankar pradhan

int a=30;
printf("%d");

the output is 30

Is This Answer Correct ?    33 Yes 38 No

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

Answer / reegan

printf"%d");
it just prints '0'

Is This Answer Correct ?    12 Yes 21 No

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

Answer / mousam sahu

it will give the statement missing error
bcoz printf must have the statment ilke ;

Is This Answer Correct ?    2 Yes 16 No

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

Answer / mousam sahu

it will give an expression syntax error as printf must have
an expression like ;

Is This Answer Correct ?    5 Yes 22 No

Post New Answer

More C++ General Interview Questions

In the derived class, which data member of the base class are visible?

0 Answers  


What is overloading unary operator?

0 Answers  


What is flush c++?

0 Answers  


What are the sizes and ranges of the basic c++ data types?

0 Answers  


Explain about templates of C++.

0 Answers  






What is an inline function in c++?

0 Answers  


What is a rooted hierarchy?

0 Answers  


What is iterator in c++?

0 Answers  


int f() { int I = 12; int &r = I; r += r / 4; int *p = &r; *p += r; return I; } Referring to the sample code above, what is the return value of the function "f()"? a) 12 b) 15 c) 24 d) 17 e) 30

2 Answers   AIG, Quark,


Can non-public members of another instance of the class be retrieved by the method of the same class?

0 Answers  


What is general form of pure virtual function? Explain?

0 Answers  


How can a called function determine the number of arguments that have been passed to it?

0 Answers  


Categories