1. Explain the detailed steps of creating, compiling, and executing a C++ program.
1. Type a c++ program in a text editor and save the file name with a .cpp extension.
2. The preprocessor processes the program before compilation. Preprocessor process
header files such as iostream and cmath.
3. Compile your program using a compiler. This process converts the source code to an
object code which is understandable by the machine. The object code usually has the
same name as the source code but with a different extension. The extension of the
object code is .obj.
4. Then the linker links the program, this creates an executable file .exe (filename same
as source code) after linking the object code and the library files (header files)
required for the program.
5. Finally, run the executable file. In this step, the statements in the program will be
executed one by one.