C & C++ Programming



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++.


RS Technopoint Training Institute © All Right Reserved.