by qznc · 2y ago · 0 comments
I just tried and it shows me 33738 lines (744 lines for C btw).
In a language like C++, even Hello World uses like half of all the language features.
With C you just need a definition for printf instead of including stdio. In the old days you'd get by without even defining it at all.
void main() { puts("Hello, World!"); }
You get a warning, but it is fine.GCC and Clang have a `__builtin_printf()` instead, quite useful for adhoc printf-debugging without having to include stdio.h. Under the hood it just resolves to a regular printf() or puts() stdlib call though.
Similarly, in C, you can just give the definition of printf and omit the include of stdio.h, which also saves a ton of preprocessed lines.