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 is variable in c with example?

1 Answers  


What is the difference between if else and switchstatement

0 Answers  


what is the meaning of java that is (J A V A) full form of JAVA

71 Answers   AKS University, Bhel, BNL, BPO, HCL, Peacecon,


What will be the output of the following program #include<stdio.h> void main() { int i=20; i-=i+++++i++; printf("%d",i); }

5 Answers  


Why main function is special give two reasons?

0 Answers  






Write a program in c to print 1 121 12321 1234321 123454321

11 Answers   ANR, College School Exams Tests, Mu Sigma, Wipro,


What is c programming structure?

0 Answers  


Distinguish between actual and formal arguments.

0 Answers  


#include<stdio.h> void main() { char *str; long unsigned int add; str="Hello C"; add=&str[0]; printf("%c",add); } What is the output?

4 Answers   Infosys,


Describe dynamic data structure in c programming language?

0 Answers  


What is 2 d array in c?

0 Answers  


Difference between goto, long jmp() and setjmp()?

0 Answers   EXL,


Categories