Explain Sections of Code

Preprocessor Directive:

Declares that we are including a library of code in our program, in this case iostream lets us output to the terminal.

Main Function:

The ‘main’ body of our code, this is the home for all of our statements.

Expression Statements:

These are statements that are output to the terminal.

Declaration Statements:

Statements that create variables and give them value.

Return Statement:

Returns an integer to the main function at the end of our program.

1 Like

Preprocessor Directive- instruction for compiler
Main Function() without it c++ won’t run -necessity
Expression Statement values and sentences are expressed
Declaration statement declares and assigns value to variables
Return statementreturns a 0 to check to see if operates smooth

Privacy & Terms