/*
* File: hello.c
* -------------
* This program prints the message "Hello, world."
* on the screen. The program is taken from the
* classic C reference text "The C Programming
* Language" by Brian Kernighan & Dennis Ritchie.
*/
#include
#include "genlib.h"
main()
{
printf("Hello, world.\n");
}
Notes
- the ".c" denotes a c source code file
- Comments lie between /* and */
- Library inclusions
- The #include preprocessor directives cause the header files
of libraries to be taken in by the C compiler.
- Note the difference
- #include < xyzzy.h > -- for a standard system library
- #include "xyzzy.h" -- for a 201 library or your own library
- The printf function
- Main program