If for example I should not use standard library functions like printf()
, putchar()
then how can I print a character to the screen?
Is there an easy way of doing it. I dont know much about system calls and if I have to use them then how do I use them? So can any one advice an easy way of printing without using library functions?
In standard C, you can't. The only I/O defined in C is through the C standard library functions.
On a given platform, there may be ways to do it:
write
call directly, without using your C library. Grab the source of your C library to see how it's done.Unless you're writing your own C library, I'm not sure why you'd want to do this.