Basic program structure

#include libraries

GLOBAL VARIABLES

functions

void main ()
{
statements
}

An important part of learning how to program is learning how to read code. You need to be able to 'think' like a computer so that you can simulate its actions.

You can think of the 'main' function as the starting point. As you read the code line by line, you will need to keep track of all of the variables in the program.

Whenever you encounter a function, you 'jump' to that function and continue reading there. When you come to the end of the function, you go back to where you left off when you encountered the function. This is very important to understand, so I'll keep repeating it througout my notes!