Execute and Explain the Output for the Given Code
main () int a=300,b=0,c; if (a>=400) b=100; c=200; printf("\nA=%d, B=%d, C=%d",a,b,c); What is the output of above program?
Answers
Answered by
0
A=300, B=0, C=200
The b=100; is not executed as a is not >= 400... a, b abd c are assigned values directly in the declaration statements...
====
1 main () {
2 int a=300,b=0,c;
3 if (a>=400) b=100;
4 c=200;
5 printf("\nA=%d, B=%d, C=%d",a,b,c);
6 }
The b=100; is not executed as a is not >= 400... a, b abd c are assigned values directly in the declaration statements...
====
1 main () {
2 int a=300,b=0,c;
3 if (a>=400) b=100;
4 c=200;
5 printf("\nA=%d, B=%d, C=%d",a,b,c);
6 }
Similar questions