For C++ most of that is iostream.
$ cat hello.cpp
#include <cstdio>
int main(void) { puts("Hello, World!"); }
$ g++ -static hello.cpp
$ du -h a.out
857K a.out
Compiling for size (-Os -fdata-sections -ffunction-sections hello.c -Wl,--gc-sections) gives 816KWith iostream I get 1.6M