what will be the output of this program........
main()
{
int a=2,b=4,c=6;
printf("%d");
}
why it gives the value of third variable.

Answers were Sorted based on User's Feedback



what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"..

Answer / biren

6

Is This Answer Correct ?    5 Yes 2 No

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"..

Answer / srsabariselvan

6
because it'll print the last garbage value stored.

Is This Answer Correct ?    3 Yes 1 No

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"..

Answer / mallikharjuna

6 will come

Is This Answer Correct ?    2 Yes 1 No

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"..

Answer / srinivas

the above question will give the output 0.

Is This Answer Correct ?    2 Yes 3 No

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"..

Answer / jayasree

2

Is This Answer Correct ?    7 Yes 9 No

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"..

Answer / lilly

u get garbage value!!!

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Interview Questions

What’s a signal? Explain what do I use signals for?

1 Answers  


Can anyone tell what is stack overflow? what precaution we should take?

1 Answers  


count the numbers between 100 and 300, that star with 2 and ends with 2

5 Answers   Mind Tree,


write a program to sort the elements in a given array in c language

10 Answers   TCS,


difference between Low, Middle, High Level languages in c ?

1 Answers   Bosch, Infosys,


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

1 Answers  


What does #pragma once mean?

1 Answers   Celstream,


What is this pointer in c plus plus?

1 Answers  


How to print %d in output

6 Answers   Wipro,


Explain what is the use of a semicolon (;) at the end of every program statement?

1 Answers  


Write a C program to perform some of the operation which can be performed using Single linked list

1 Answers   Qualcomm,


When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these

1 Answers   Accenture, IBM,


Categories