What does our preprocessor directive do?
#include adds a header file to the beginning of our program. This header file declares all the functions in the iostream library. The external library gets linked to or program later in the compile process.
Why do we have a main function? What does it’s return statement do?
The main() function is the entry point to our program. All other functions are called from here. When the main() function ends so does our program. The main function has type “int” and so returns an int (0) to the OS when it ends with the “return 0;” statement.
Explain our expression and declaration statement that we have written so far, to summarize what our program is doing.
Expressions are bits of code that do stuff. They end with a ;. e.g print text or variables to the screen, call other functions or carry out mathematical operations.
Declarations declare, initialize or assign variables, constants or functions etc. e.g “const int a = 5;” initializes a constant integer called ‘a’ and assigns the value ‘5’ to it.