4 ms·
That might be the case with glibc but other libraries, compilers and OSes do not follow that. A minimal statically compiled C program in OpenWatcom under Window
by Crinus 7y ago
That might be the case with glibc but other libraries, compilers and OSes do not follow that. A minimal statically compiled C program in OpenWatcom under Windows is around 50KB and a statically compiled C program in MSVC is around 100KB (i do not count GCC/Clang because last time i checked those generate code that rely on msvcrt.dll which actually is a C library that comes with Windows).
Other languages do follow a similar pattern too. Free Pascal has its own runtime library which is linked statically to the executable, does not link against libc unless you want to use c library functions (or libraries that themselves may want to link against c), has a much richer library than libc and yet it can create executables around the same size as C (a simple hello world is a 40KB .exe file in FPC).
So, no, the reason for C having small executables is not that C has any head start (besides, with the exception of GCC and Clang, no other Windows C compiler in Windows relies on a C libraries that comes with Windows, although some - like MSVC and C++ Builder - can use it as a dynamic library which may or may not be installed system-wide).