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

So today I wrote my first program

Name: Anonymous 2010-09-22 4:40


#include <stdio.h>
#include <stdlib.h>
int main(void)
{
 return (printf("hello, world") < 0) ? EXIT_FAILURE : EXIT_SUCCESS;
}


My teacher said that I shouldn't program at all. What the fuck?

Name: Anonymous 2010-09-22 5:23

i have to agree. why are you including stdlib.h? knock it off with that EXIT_SUCCESS faggotry and use a literal 0. it's clearer that way. also don't bother checking for failures when writing to stdout. if your writes to stdout are failing, you're fucked no matter what you do. your program will be cleaner without the extra code

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