Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What will this C code do?

Name: Anonymous 2012-01-19 8:24

void main(){
int x=1;
printf("%d\n",x=2);
}

Name: Anonymous 2012-01-21 18:24

>>106
No, I couldn't find evidence. Standard only cites that an union is a structure where the storage of all its members overlap. The other way around may produce undefined behavior, if the value assigned to a.bar isn't a valid float. Also, if a.bar overflows, it's better to write:
union word {
    float foo;
    uint32_t bar;
};

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List