From owner-freebsd-hackers Fri Feb 5 13:50:37 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA07965 for freebsd-hackers-outgoing; Fri, 5 Feb 1999 13:50:37 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gatewaya.anheuser-busch.com (gatewaya.anheuser-busch.com [151.145.250.252]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id NAA07960 for ; Fri, 5 Feb 1999 13:50:35 -0800 (PST) (envelope-from Matthew.Alton@anheuser-busch.com) Received: by gatewaya.anheuser-busch.com; id MAA19913; Fri, 5 Feb 1999 12:38:02 -0600 Received: from stlabcexg004.anheuser-busch.com(stlabcexg004 151.145.101.160) by gatewaya via smap (V2.1) id xma019895; Fri, 5 Feb 99 12:37:45 -0600 Received: by stlabcexg004.anheuser-busch.com with Internet Mail Service (5.5.2232.9) id <1KANNZXX>; Fri, 5 Feb 1999 18:40:00 -0000 Message-ID: <31B3F0BF1C40D11192A700805FD48BF90177670F@STLABCEXG011> From: "Alton, Matthew" To: "'Hackers@FreeBSD.ORG'" Subject: C headers Date: Fri, 5 Feb 1999 18:39:36 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2232.9) Content-Type: text/plain Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Why does printf() non need #include 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 . 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