Date: Thu, 25 Oct 2007 17:22:11 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Oliver Fromme <olli@lurza.secnetix.de> Cc: freebsd-questions@FreeBSD.ORG, h.schmalzbauer@omnisec.de Subject: Re: Mentor for C self study wanted Message-ID: <20071025152211.GA7507@owl.midgard.homeip.net> In-Reply-To: <200710251502.l9PF209C064013@lurza.secnetix.de> References: <200710232324.09851.h.schmalzbauer@omnisec.de> <200710251502.l9PF209C064013@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 25, 2007 at 05:02:00PM +0200, Oliver Fromme wrote: > Harald Schmalzbauer wrote: > > > > #include <stdio.h> > > > > 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 <stdlib.h>" 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/ ) -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071025152211.GA7507>