Introduction

C and C++ are two of the world’s most important programming languages. Indeed, to be a professional programmer today implies proficiency in these two languages. They are the foundation upon which modern programming is built.

C was invented by Dennis Ritchie in the 1970s. C is a middle-level language. It combines the control structures of a high-level language with the ability to manipulate bits, bytes, and pointers (addresses). Thus, C gives the programmer nearly complete control over the machine. C was first standardized late in 1989 when the American National Standards Institute (ANSI) standard for C was adopted. This version of C is commonly referred to as C89. This standard was also adopted by ISO (International Standards Organization). C89 was amended slightly in 1995.

C++ was created by Bjarne Stroustrup, beginning in 1979. The development and refinement of C++ was a major effort, spanning the 1980s and most of the 1990s. Finally, in 1998 an ANSI/ISO standard for C++ was adopted. In general terms, C++ is the object-oriented version of C. C++ is built upon the foundation of C89, including its 1995 amendments. In fact, the version of C defined by C89 is commonly referred to as the “C subset of C++.” Although C++ began as a set of object-oriented extensions to C, it soon expanded into being a programming language in its own right. Today, C++ is nearly twice the size of the C language. Needless to say, C++ is one of the most powerful computer languages ever devised.

In 1999, a new ANSI/ISO standard for C was adopted. This version is called C99. It includes a number of refinements and several new features. Some of these “new” features were borrowed from C++, but some are entirely new innovations. Thus, several of the elements added by C99 are incompatible with C++. This means that with the advent of C99, Standard C is no longer a pure subset of C++. Fortunately, many of the incompatibilities relate to special-use features that are readily avoided. Thus, it is still easy to write code that is compatible with both C and C++. At the time of this writing, no major compiler currently accepts all of the C99 additions.

The following table synopsizes the relationships between C89, C99, and C++.

C89

The original ANSI/ISO standard for C. C89 is what most programmers today think of as C.

C++

The object-oriented version of C. The current ANSI/ISO standard for C++ is built upon C89. Thus, C89 forms a subset of C++.

C99

The latest standard for C. Includes all of C89, but adds several new features. Some of the new features are not supported by the current standard for C++.

The material in this book describes C89, C99, and C++. When a feature is unique to one of these, it will be so flagged. Otherwise, you can assume that the feature applies to all three.

As you are undoubtedly aware, C and C++ are large topics. It is, of course, not possible to cover every aspect of these important languages here. Instead, this quick reference distills their most salient features into a convenient and easy to use form.




C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net