/* ** $Id: hello.c 713 2008-01-28 19:46:41Z phf $ */ /* needed for puts() */ #include /* needed for EXIT_SUCCESS */ #include int main(void) { puts( "Hello World!" ); return EXIT_SUCCESS; } /* ** Commentary ** ** We could do "return 0;" instead of "return EXIT_SUCCESS;" like ** we did in class. In fact, stdlib.h simply defines EXIT_SUCCESS ** to *be* the value 0. However, the code is easier to read if we ** use a symbolic name, that way you don't have to ask yourself ** "Hmm, what did 0 mean here?" when you read the program. It is ** generally a Bad Idea (tm) to have "magic numbers" like "0" or ** "47" in your code; usually they mean something besides just a ** numeric value, and you should introduce a meaningful name and ** use that instead of the "plain" value. */