Article 4V2E9 Tearing apart printf()

Tearing apart printf()

by
Thom Holwerda
from OSnews on (#4V2E9)
If 'Hello World' is the first program for C students, then printf() is probably the first function. I've had to answer questions about printf() many times over the years, so I've finally set aside time for an informal writeup. The common questions fit roughly in to two forms: Easy: How does printf mechanically solve the format problem?Complex: How does printf actually display text on my console? My usual answer? "Just open up stdio.h and track it down" This wild goose chase is not only a great learning experience, but also an interesting test for the dedicated beginner. Will they come back with an answer? If so, how detailed is it? What IS a good answer? This is incredibly detailed and definitely over my head, but I'm sure many of you will enjoy this one greatly.
External Content
Source RSS or Atom Feed
Feed Location http://www.osnews.com/files/recent.xml
Feed Title OSnews
Feed Link https://www.osnews.com/
Reply 0 comments