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 ?    85 Yes 28 No

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

Answer / guest

it is used to print one integer data type value.

Is This Answer Correct ?    87 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 ?    26 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 / sid

it will give output "0"

Is This Answer Correct ?    48 Yes 42 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 / narendra

it will print 0

Is This Answer Correct ?    4 Yes 0 No

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

Answer / anzarudeen

garbage value

Is This Answer Correct ?    4 Yes 1 No

Post New Answer



More C++ General Interview Questions

What are templates? where we should use it?

2 Answers   Alcatel,


Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);

2 Answers  


1. What does the following do: void afunction(int *x) { x=new int; *x=12; } int main() { int v=10; afunction(&v); cout<<v; } a) Outputs 12 b) Outputs 10 c) Outputs the address of v

5 Answers   Quark,


Write a function which takes a character array as input and reverses it in place.

2 Answers   Lehman Brothers, Vision Infotech,


What are inline functions?

2 Answers   Verizon,






what do you mean by memory management operators

4 Answers   HCL,


What is RTRT tool?can it be used for automation?can it work on packet PC?

3 Answers  


What are the basics of classifying different storage types, why?

2 Answers   Symphony, Astergate,


Why preincrement operator is faster than postincrement?

5 Answers  


i want the NIC programmer-B model papaer pattren, iwant the all model papers?

15 Answers   NIC,


class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.

2 Answers   Quark,


plz send me National informatics center paper pattern

1 Answers  






Categories