Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336 What is the output of the program? #include<stdio.h> int main() { union a { int i; char ch[2]; }; union a u; u.ch[0] = 3; u.ch[1] = 2; printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i); return 0; } ?->(Show Answer!)
1. What is the output of the program? #include<stdio.h> int main() { union a { int i; char ch[2]; }; union a u; u.ch[0] = 3; u.ch[1] = 2; printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i); return 0; }
Ask Your Doubts Here
Comments
By: guest on 01 Jun 2017 06.01 pm
printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i); It prints the value of u.ch[0] = 3, u.ch[1] = 2 and it prints the value of u.i means the value of entire union size. So the output is 3, 2, 515.