This is the online version of The C Book, second edition by Mike Banahan, Declan Brady and Mark Doran, originally published by Addison Wesley in 1991. This version is made freely available.
C and C++ books
Page 1 This is the online version of The C Book, second
edition by Mike Banahan, Declan Brady and Mark Doran, originally published
by Addison Wesley in 1991. This version is made freely available.
Page 2 C and C++ are widely promoted as ideal portable, fast, and - in the case of C++ - "object-oriented" languages. This characterization is deserved when C is considered for systems-level programs such as compilers, or for mass-market products such as word processing or spreadsheet programs.
Page 3 Before there was C++ there was C. Developed at Bell Laboratories in the early 1970's, C was used for over 95% of the code in the UNIX operating system kernel.
Page 4 An array in C is a region of memory in which the elements can be accessed using an index (in a 1-dimensional array, e.g. name) or several indices (in a multi-dimensional array, e.g. names). The first element in a 1-dimensional array x is x, in a 2-dimensional array x is x, and so on.
Page 5 The terms low level and high level are often used to describe these layers of complexity in computers. The low level is buried in the computer's microchips and microcircuits. The low level is the level at which the computer seems most primitive and mechanical, whereas the high level describes the computer in less detail, and makes it easier to use.
Page-6 The two functions DOMString.transcode() and XMLString::transcode() return arrays of raw data, in the first case a char * (an old-fashioned C string) and in the second case a zero-terminated array of XMLCh's.
Namespaces are a very powerful C++ language feature. This article does not teach you the syntax of namespaces. Rather, it shows you how to use them properly.
In this section for example-based C tutorials that introduce you to ODBC API programming in C. Each tutorial contains C ODBC code samples that illustrate database access tasks such as establishing an ODBC connection, generating result sets and fetching the results.
This book is a tremendous achievement. You owe it to
yourself to have a copy on your shelf. The chapter on iostreams is the most
comprehensive and understandable treatment of that subject I?ve seen to
Page 10 As a programming language, C is rather like
Pascal or Fortran. Values are stored in variables. Programs are structured
by defining and calling functions. Program flow is controlled using loops,
if statements and function calls.
Page 11 In early 1990, C++ was chosen as the implementation language for a huge telecommunications project at Ellemtel Telecommunications Systems Laboratories in Stockholm, Sweden. A programming standard for the project was written by Erik, a document that was later maintained by the two of us, working as the C++ support group.
Page 12 This section is designed to give you a general overview of the C programming language. Although much of this section will be expanded in later sections it gives you a taste of what is to come.
Page 13 This book was motivated by my experience in teaching the course E&CE 250: Algorithms and Data Structures in the Computer Engineering program at the University of Waterloo. I have observed that the advent of object-oriented methods and the emergence of object-oriented design patterns has lead to a profound change in the pedagogy of data structures and algorithms.