Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print something without using std lib functions?

Tags:

c

In the C language, when printing something on the screen, we usually use printf, puts and so on. Which are all defined in the or other header documents.

Is there any way to print something on screen without using such functions? That is to say, how is printf realised?

like image 713
Grub Avatar asked Dec 08 '22 06:12

Grub


1 Answers

Eventually the C function printf will result in a sys_write system call, directly or by going through write (see man 2 write). The actual implementation depends on the compiler and the standard libraries.

like image 102
Anthon Avatar answered Dec 26 '22 03:12

Anthon