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

how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

0 Answers   Gopaljee, TCS,


write a program structure to find average of given number

1 Answers  


What is the size of structure pointer in c?

0 Answers  


What is the main difference between calloc () and malloc ()?

0 Answers  


ABCDCBA ABC CBA AB BA A A

4 Answers   TCS,






Can U write a C-program to print the size of a data type without using the sizeof() operator? Explain how it works inside ?

3 Answers   HCL, TCS,


How can you check to see whether a symbol is defined?

0 Answers  


What does a run-time "null pointer assignment" error mean?

2 Answers  


Write a program for the following series? 1 121 12321 1234321 123454321 12345654321 1234567654321 123456787654321 12345678987654321 1234567890987654321 123456789010987654321 12345678901210987654321 1234567890123210987654321 .........1234321............ ..........123454321............ ..........12345654321............ 7 8 9 0 1 Pls............?

5 Answers  


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

0 Answers  


Are c and c++ the same?

0 Answers  


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

0 Answers  


Categories