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 16:26

>>91
A different C program or a different translation unit? I don't know about a different C program (not sure how that would work out), but objects with static duration are initialized before program startup, so the behaviour would be defined.

I said it was strange because he could just cast the float to int.

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