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-22 12:17

>>94
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.

Informally, in C, variables are named objects. These variables have scope, duration, and linkage. Also, an object is a runtime thing. Ie, it doesn't exist at compile time. Eer....why am I arguing with some faggot that thinks global variables are static?

Why don't you just fucking read the standard and write some code you moron.

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