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 can make variable not in registers

1 Answers   TCS,


What is a macro in c preprocessor?

0 Answers  


Is c call by value?

0 Answers  


player is good if the following conditions are satisfied: He is either from “India”, “Japan” or “Korea” He has a minimum of 3 years of experience He has won at least 3 major tournaments, and one of them must be "World Championship Tournament". He must know more than 10 techniques. (but see next question) If he knows less than 10 techniques, then he must be a world champion. His name contains at least 3 words. For example "Sachin Tendulkar" will not meet this condition. Write a method: boolean isGoodPlayer(String name, String country, int yearsExperience, String[] majorTournamentsWon, String[] techniques, boolean isWorldChampion) name country yearsExperience majorTournamentsWon techniques isWorldChampion

1 Answers  


Here is alphabets : abcdefgh 1) how to reverse. as hgfedcba 2) after reversal, how to group them in a pair hg fe dc ba.

2 Answers  






Explain what is the difference between null and nul?

0 Answers  


What are the different types of data structures in c?

0 Answers  


explain what is an endless loop?

0 Answers  


what will be the output off the following program? #include<stdio.h> int main() { int a; a=015+0*71+5; printf("%d,a"); return0; }

9 Answers   HCL,


1 1 12 21 123 321 12344231 how i creat it with for loop??

1 Answers  


Difference between Class and Struct.

13 Answers   Ericsson, Motorola, Wipro,


How to receive strings with spaces in scanf()

7 Answers  


Categories