Whether C standard library is static library or dynamic library?
it depends on how you link your program. you can go both ways. On VS, you can specify either /MT
(static) or /MD
(dynamic). On gcc, you can specify -static-libgcc
flag to link your program against the static library.
Refer to http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html for more info on gcc flags and http://msdn.microsoft.com/en-us/library/abx4dbyh(v=vs.80).aspx for VS.
You should not really care.
And the compiler could even handle some standard function specially, provided it does so according to what the standard defines.
Sometimes GCC does things like that, for instance it might optimize a call to memset to a loop...
If your question is how you linked your program foo
, on GNU/Linux the command ldd foo
answers that.
Cheers.