From owner-freebsd-questions@FreeBSD.ORG Thu Oct 25 15:22:18 2007 Return-Path: Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EC6116A474 for ; Thu, 25 Oct 2007 15:22:18 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id F065113C481 for ; Thu, 25 Oct 2007 15:22:17 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:59215 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Il4XI-0005Yd-3f for freebsd-questions@FreeBSD.ORG; Thu, 25 Oct 2007 17:22:16 +0200 Received: (qmail 47863 invoked from network); 25 Oct 2007 17:22:11 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 25 Oct 2007 17:22:11 +0200 Received: (qmail 7609 invoked by uid 1001); 25 Oct 2007 17:22:11 +0200 Date: Thu, 25 Oct 2007 17:22:11 +0200 From: Erik Trulsson To: Oliver Fromme Message-ID: <20071025152211.GA7507@owl.midgard.homeip.net> Mail-Followup-To: Oliver Fromme , freebsd-questions@FreeBSD.ORG, h.schmalzbauer@omnisec.de References: <200710232324.09851.h.schmalzbauer@omnisec.de> <200710251502.l9PF209C064013@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200710251502.l9PF209C064013@lurza.secnetix.de> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1Il4XI-0005Yd-3f. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Il4XI-0005Yd-3f fafd9f53c8f36f7b56cdc05a05202b90 Cc: freebsd-questions@FreeBSD.ORG, h.schmalzbauer@omnisec.de Subject: Re: Mentor for C self study wanted X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2007 15:22:18 -0000 On Thu, Oct 25, 2007 at 05:02:00PM +0200, Oliver Fromme wrote: > Harald Schmalzbauer wrote: > > > > #include > > > > void main() > > That's not a C program. :-) > > The return value of the main function of a valid C program > must be int. And of course, your main function should > end with "return 0;" or "exit(0);" (the latter requires > "#include " at the top). > > By the way, I recommend you get a copy of the C standard > and use it for reference. You can buy a digital copy (PDF) > at http://webstore.ansi.org/ (Search for "9899-1999"), > it's $30. Alternatively ask Google for "C99 draft" to get > a free copy of a draft of the standard, which isn't very > different from the final standard. > > You can also buy a hardcopy of the standard (i.e. a book), > but it was ~ $300 last time I looked. That may be the price if you order a paper copy directly from ANSI/ISO, but the C standard has also been published as a regular book (ISBN 978-0-470-84573-8) which is not quite so expensive. For a beginner the standard itself is probably a bit too heavy-going. The book usually recommended is 'The C programming language, Second edition' by Kernighan and Ritchie. ( http://cm.bell-labs.com/cm/cs/cbook/ ) -- Erik Trulsson ertr1013@student.uu.se