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

write a program to display the numbers in the following format 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 4

9 Answers   IBM, NIIT, Winit,


identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5;

8 Answers   TCS,


What is the difference between test design and test case design?

0 Answers  


What is the meaning of c in c language?

0 Answers  


What is the difference between %d and %*d in C

3 Answers  






What is the difference between functions abs() and fabs()?

0 Answers  


Why is this loop always executing once?

0 Answers  


Write a C program to read the internal test marks of 25 students in a class and show the number of students who have scored more than 50% in the test. Make necessary assumptions.

1 Answers  


Write a code to reverse string seperated by spaces i/p str=India is my country o/p str=aidnI si ym yrtnuoc After writing code, optimize the code

1 Answers  


What is the difference between exit() and _exit() function in c?

0 Answers  


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

0 Answers   TATA, TCS,


How can a program be made to print the line number where an error occurs?

0 Answers  


Categories