Where is the printf body defined?

J

jeniffer

Stdio.h just has the declaration of printf function.Where is the body
of printf function defined?
 
M

Mike Wahler

jeniffer said:
Stdio.h just has the declaration of printf function.Where is the body
of printf function defined?

In the standard library implementation that
gets linked with your application code.
Some vendors provide its source code, others
do not. But note that many of the library
functions are necessarily platform-specific
(e.g. the code will directly address particular
hardware types such as video controllers, etc.,
and won't be portable to other platforms.)

-Mike
 
J

Joe Smith

Mike Wahler said:
In the standard library implementation that
gets linked with your application code.
Some vendors provide its source code, others
do not. But note that many of the library
functions are necessarily platform-specific
(e.g. the code will directly address particular
hardware types such as video controllers, etc.,
and won't be portable to other platforms.)

I just accidentally stepped into printf. All you want to do there is step
out of the assembly if your implementation looks like mine. Be aware of the
return value == # of printed chars. joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top