Date: Fri, 5 Feb 1999 18:39:36 -0000 From: "Alton, Matthew" <Matthew.Alton@anheuser-busch.com> To: "'Hackers@FreeBSD.ORG'" <Hackers@FreeBSD.ORG> Subject: C headers Message-ID: <31B3F0BF1C40D11192A700805FD48BF90177670F@STLABCEXG011>
next in thread | raw e-mail | index | archive | help
Why does printf() non need #include <stdio.h> like the man page says?
-------------------------------------- foo.c
int
mean(int a, int b)
{
return (a + b) / 2;
}
int
main()
{
int i = 0, j = 0, answer = 0;
i = 7;
j = 9;
answer = mean(i, j);
printf("The mean of %d and %d is %d\n", i, j, answer);
return 0;
}
----------------------------------------------
builds without a #include <stdio.h>. A student asked me why and I can't explain
this inconsistency.
Matthew Alton
Computer Services - UNIX Systems Administration
(314)632-6644 matthew.alton@anheuser-busch.com
alton@plantnet.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31B3F0BF1C40D11192A700805FD48BF90177670F>
