How Does A Compiler Work In A C++ Program?


4 Answers

akshay agarwal Profile
akshay agarwal answered
A C++ compiler first checks all the syntaxes which are being used in a program. If the syntax is correct then compiler generates an assembly code for assembler.
Anonymous Profile
Anonymous answered
At the highest level, it takes c++ source code and converts it into code that the machine will understand.
The details of this process are vast and can be found if searched for on google!
Florio Potter Profile
Florio Potter answered

Each C++ source file needs to be compiled into an object file. The first step that the compiler will do on a source file is run the preprocessor on it. Only source files are passed to the compiler (to preprocess and compile it).

For more information get help at

CodeAvail- Online Computer Science Assignment

Anonymous Profile
Anonymous answered
As we all know without compiler we are not able to make a program error free the compiler is resposible to check the syntax from right to left tally code with the predefined files which are already defined with the compiler then our source file after the syntax checking is converted into object file ready to execute.
When we compile file it send a message to operating system a message 0 or 1,if compiler found program error free then it send message and return o to operating system and for error return 1.

Answer Question