[Courses] [C] lesson8 questions & answers

Jenn Vesperman jenn at anthill.echidna.id.au
Sun Nov 10 15:44:34 EST 2002


On Mon, 2002-11-11 at 07:35, Morgon Kanter wrote:
> First, my question:
> Hey, why do we keep doing
> #include <stdio.h>
> at the beginning of programs? printf doesn't even seem 
> to be a part of that, as this change of one of your examples 
> compiles and works just fine:

printf is, in fact, part of the stdio (Standard Input/Output) library.
It and other IO functions are needed in most programs. 

All I can assume for 'so why does my program work without it' is that it
is SO standard that your compiler went 'oh, they forgot to include
stdio. I'll do it for them.'

Don't rely on such behaviour. :)


Jenn V.
-- 
    "Do you ever wonder if there's a whole section of geek culture 
        	you miss out on by being a geek?" - Dancer.

jenn at anthill.echidna.id.au     http://anthill.echidna.id.au/~jenn/





More information about the Courses mailing list