main
program defined as followvoid main() {
// instructions here
}
Nb. // correspond to a comment.
3. The code is saved in a file having a .c
extension
4. Sub-programs (e.g printf
) are organized into libraries (e.g. stdio.h
) that can be included at the top of the preceding file
#include <stdio.h> // STandarD Inputs-Outputs library
void main() {
printf("%c",'a' ); // "printf" is a subprogram that puts data into screen location
printf("%i",97 );
printf("%f",3.14);
}