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

C problem

Name: Anonymous 2007-04-10 13:40 ID:YqaTtdxC


main() {
"example";
}


What happends here? Is the string example pushed somewhere?

Name: Anonymous 2007-04-14 1:49 ID:nchVaC2Y

"What happens?" and "Nothing" are stored as static strings; so in essence, you might as well say:

const char *s1 = "What happens?";
const char *s2 = "Nothing";

s1 ? s2 : (void) 0;

There is no effect here no matter what s1 or s2 are; even if s1 is null, the resultant statement of s2 does not constitute an action; and, if s1 is not null, then (void) 0 also has no effect. The statement is thus easily reduced to "Do Nothing" by any competent compiler.

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