Node:Preface, Next:, Previous:Top, Up:Top


This book is a tutorial for the computer programming language C. Unlike BASIC or Pascal, C was not written as a teaching aid, but as a professional tool. Programmers love C! Moreover, C is a standard, widely-used language, and a single C program can often be made to run on many different kinds of computer. As Richard M. Stallman remarks in GNU Coding Standards, "Using another language is like using a non-standard feature: it will cause trouble for users." (See

Skeptics have said that everything that can go wrong in C, does. True, it can be unforgiving, and holds some difficulties that are not obvious at first, but that is because it does not withhold its powerful capabilities from the beginner. If you have come to C seeking a powerful language for writing everyday computer programs, you will not be disappointed.

To get the most from this book, you should have some basic computer literacy -- you should be able to run a program, edit a text file, and so on. You should also have access to a computer running a GNU system such as GNU/Linux. (For more information on GNU and the philosophy of free software, see

The tutorial introduces basic ideas in a logical order and progresses steadily. You do not need to follow the order of the chapters rigorously, but if you are a beginner to C, it is recommended that you do. Later, you can return to this book and copy C code from it; the many examples range from tiny programs that illustrate the use of one simple feature, to complete applications that fill several pages. Along the way, there are also brief discussions of the philosophy behind C.

Computer languages have been around so long that some jargon has developed. You should not ignore this jargon entirely, because it is the language that programmers speak. Jargon is explained wherever necessary, but kept to a minimum. There is also a glossary at the back of the book.

The authors of this book hope you will learn everything you need to write simple C programs from this book. Further, it is released under the GNU Free Documentation License, so as the computers and robots in the fantasies of Douglas Adams say, "Share and Enjoy!"

The first edition of this book was written in 1987, then updated and rewritten in 1999. It was originally published by Dabs Press. After it went out of print, David Atherton of Dabs and the original author, Mark Burgess, agreed to release the manuscript. At the request of the Free Software Foundation, the book was further revised by Ron Hale-Evans in 2001 and 2002.

The current edition is written in Texinfo, which is a documentation system using a single source file to produce both online information and printed output. You can read this tutorial online with either the Emacs Info reader, the stand-alone Info reader, or a World Wide Web browser, or you can read it as a printed book.