Explaining sections of my code

preprocessor directive - a preprocessor directive includes a library in our code.

main function - it serves as entry point for the program.

expression statements - an expression statement is an expression with a semicolon at the end which makes it an expression statement.

declaration statement - a declaration statement declares something in our code.

return statement - It is required to exit our code.

P.S. Hope I 'am correct for them all. Pls let me know if I 'am wrong or partially wrong.

1 Like

Preprocessor directives. There are actually a number of directives, the most common one is #incude and is used to do exactly what you said.
What preprocessor directives do is direct the compiler during compilation. In the case of #include it says look in this file for additional code/definitions that may be used in this file. Other directives permit you to add blocks of code that only appear for debug builds or specific configurations, disable and enable specific errors and define constants or macros using them.

These are resolved at compile time resulting in specific code being produced for compilation whereas the rest of the code is what is actually compiled.

I hope this helps.

Yeah it helped. Thanks @beegeedee

1 Like

Privacy & Terms