0
Why not the output is 0 ? Why show the output 4?
Union values{ Int first; Int second; }; Int main(){ Union values v; V.frist = 0; Printf("%d\n", v.frist); Return 0; }
5 Answers
+ 2
Sir their is syntex errors in your code and spelling miss of first but u write v.first=0 and u printing this so it will print normally 0 it won't be print 4 once again check this question . Its c quizz question .
+ 2
Sir you can post your both Question in one post u don't need to post separately .
https://www.sololearn.com/Discuss/2460366/?ref=app
+ 1
// RUN THIS CODE TO KNOW WHETHER ITS 0 or 4
#include<stdio.h>
union values{
int first;
int second;
};
int main(){
union values v;
v.first = 0;
printf("%d\n", v.first);
return 0;
}
0
Are you sure about output 4.
I get only 0..
0
Please don't just type or copy paste your codes in your question.
Put them in code format(code playground) and link or share the code here. (just like I did below)
the output is 0 and not 4.