Tutorials
/*
This is a simple program.
The program displays a message on screen.
*/
#include<stdio.h> // stdio is a library (header file)
void main() // main is a function
{
printf("Hello World"); // printf is a C function which displays data on the screen.
scanf("%*c"); // scanf is a C function which waits for keyboard input
} // end of main function code
NOTES:
- #include<stdio.h> (Standard Input Output) is a pre-processor instruction, which tells the compiler to make the libary program available for use
- // indicates a comment. Anything written after // on the same line is ignored by the compiler. It is there only as documentation for the programmer
- /* ..... */ indicates a block comment. When the compiler see /*, it ignores everything until it finds */