In: Computer Science
Solution:
when you compile a c/c++ code the compiler takes care of all the intermediate steps like preprocessing , compilation and linking . But with some options you can stop the compilation at intermediate steps.
with the use of -c option you can stop the compilation process before the linking the process it says the compiler(gcc /g++) that do not run linker. That is when you use the -c option the output file produced will be of object code but not the executable code.
The -g option is used for debugging purposes. when you compile a source file with -g option the executable produced includes the source code into the executable and you can perform debugging with the help of GNU Debugger (gdb).
The -Wall option is used to enable all the warnings messages when compiling the program. That is it can warn you about unused variables, non void functions returns no values .. etc..
The -o option is used to create the executable with the given filename. this option is always used with a file name. If this option is not used when compiling the output executable will be created with the file name a.out by default.
I hope this would help...........