1. Program Structure

sqr.c
#include <stdio.h>	// #include and #define stuff here

double sqr( double x)	// functions other than main here
{
  return x*x;
}

int main( void)		// main program
{
  double a, b = 2.2;	// declare variables

  a = sqr(b);		// executable code ...

  printf( "sqr(%g) = %g\n", b, a);

  return 0;		// main returns an int to the OS environment
}
Also see Etter: chapter1_1.c, variables