What does our preprocessor directive do?
Preprocessor directives are instructions for the compiler and they should ALWAYS be written at the start of the code. They include instructions that load other libraries of code before compilation.
Why do we have a main function? What does it’s return statement do?
It is used as the entry point and it is required to compile the program. Since main()
is an int function, there needs to be a return statement of the same type. Return statements are outputs of the function, since main just needs a way to return and exit code, we just write: return 0;
Explain our expression and declaration statement that we have written so far, to summarise what our program is doing.
In this program, we have just written the instructions that will be displayed at the start of our game, declared three const
variables (a, b, c
) and displayed each the sum and product of these variables.