Describe in detail how a C program is compiled and executed
Answer
1) The preprocessor code searches for preprocessor directives (mainly #include or #define) and substitute them with their codes,the output of this step creates an expanded file (.I file)
2) the compiler takes .I file and coverts the high level code into assembly then into machine language (binary format) and generate .obj file
3) the linker takes .obj file and link it with C standard library functions in your code
and generates the executable version of your C code
No comments:
Post a Comment