1.ccommands usedCode:#include<stdio.h> main() { }
$ cc -E 1.c -o 1.i <--to create extd source file
$ cc -c 1.c <----to create object file2.ccommands usedCode:#include<stdio.h> #include<string.h> main() { }
When I use 'll' command (long format)$ cc -E 2.c -o 2.i
$ cc -c 2.c
red=> size of file.-rw-r--r-- 1 user user 29 2011-12-14 01:18 1.c
-rw-r--r-- 1 user user 17036 2011-12-14 01:16 1.i
-rw-r--r-- 1 user user 666 2011-12-14 01:17 1.o
-rw-r--r-- 1 user user 48 2011-12-14 01:22 2.c
-rw-r--r-- 1 user user 38432 2011-12-14 01:18 2.i
-rw-r--r-- 1 user user 666 2011-12-14 01:18 2.o
As you can see the size of the 1.o and 2.o are same and the size of the 1.i is much greater than that of the 1.o (object file).
Can someone enlighten me on this?
why and how the included files (header files) are removed after 'PREPROCESSING STAGE'.