17. Translation Unit

Each file of C code, after preprocessing, is a translation unit.

A translation unit is a sequence of declarations and function definitions.

Executable statements appear in function bodies.

The main program is a function named main.

All function arguments are passed by value.

Example:

  #include <stdio.h>

  int i;
  int myfunc(int);

  int main( void)
  {
    int j;

    i = 3;
    j = myfunc(i);
    /* ... */

    return 0; /* success */
  }