For the exercise in Lesson 20:
I have no clue what the preprocessor directive does. I was just told to stick it in there, so I did. I would assume, based on the fact that the command is called “include”, that it’s calling some preprepared function called iostream, but I don’t have any idea what iostream is or what it does.
The main function statement is essentially the only code which will run without being called. Anything outside of this main function will not run unless it is called inside of the main function.
Expression statements are expression statements because they don’t fit into any other category. Expression seems to be a fallback label which you call anything that doesn’t have a more specific purpose (be that declaring a variable, or returning an exit code.) This particular set of expression statements prints strings to a terminal.
Declaration Statements declare variables. It’s pretty straightforward, and the name makes sense for what it is. This set of Declaration Statements… well, it declares variables. Five of them, to be precise, all of them constant and two of them using the preset values of the first three.
The second set of expression statements print variables instead of strings, but they’re still printing things. Nothing new here.
Last, the return statement. This is what generates your exitcode, which outputs as the integer value of main once it finishes running. If it returns 0, there were no errors. I’m guessing that when code gets more complex, there will be other return statements here and there where things could go off the rails to explain what went wrong, but with no user input it shouldn’t ever give a number that isn’t zero.