Next: Variables Up: Basic C Programming Previous: Basic C Programming

C Program Structure

A C program basically has the following form:

We must have a main() function.

A function has the form:

If the type definition is omitted C assumes that function returns an integer type. NOTE: This can be a source of problems in a program.

So returning to our first C program:


Let us look at another printing statement:


The output of this would be:
Fri May 20 13:40:49 BST 1994