How to write Hello World in pure c (without using c library)?

advertisements

I know that linux kernel source is in pure c. So I want to know how can I write simple Hello, World program in pure C without using printf api?


I know that linux kernel source is in pure c.

It is most certainly not. The Linux kernal is infamous for the frequent use of non-standard extensions from the GCC compiler.

So I want to know how can I write simple Hello, World program in pure C without using printf api?

printf is just a wrapper around the OS API functions. Do you mean to ask how to write printf using only Linux API functions? Becase "pure C" is defined in the C standard ISO 9899, which has nothing to do with the Linux OS.