Steps involved in converting the C source code to executable: Now, we are going to see how to convert a C source code to executable and also about the steps involved in compiling a C program. C program compilation involves 4 steps which are as follows. Converting C source code to Preprocessed code Converting preprocessed code to assembly code Converting assembly code to object code Converting object code to binary Steps involved in compiling a C Program Here, we have two c files main.c and add.c. Below is the source code for main.c #define NUM1 10 #define NUM2 20 int main() { int a, b; a = NUM1; b = NUM2; add(a, b); return 0; } Below is the source code for add.c #include <stdio.h> #define STRING "Result:" void add(int a, int b) { int c; c = a + b; printf("%s %d\n", STRING, c); return; } As I mentioned earlier, compiling a C program involves 4 phases. They are preprossesin...
The Only Shot to You need to kickstart your programming in any language