perhaps with slight variations for language-specific features.
C is a compiled language, which means that your C source code is first
analyzed by the preprocessor and then translated into assembly language
before it’s translated into machine instructions that are appropriate to the
target CPU. An assembler then creates a binary, or object, file from the
machine instructions. Finally, the object file is linked to any required external
software support by the linker. A C program is stored in a text file that ends
with a .c extension and always contains at least one routine, or function,
such as main(), unless the file is an include file (with a .h extension, also
known as a header file) containing shared variable definitions or other data or
declarations. Functions are the commands that perform each step of the task
that the C program was written to accomplish.
NOTE
The Linux kernel is mostly written in C, which is why Linux works with so
many different CPUs. To learn more about building the Linux kernel from
source, see Chapter 22, “Kernel and Module Management.”
C++ is an object-oriented extension to C. Because C++ is a superset of C,
C++ compilers compile C programs correctly, and it is possible to write non-
object-oriented code in C++. The reverse is not true: C compilers cannot
compile C++ code.
C++ extends the capabilities of C by providing the necessary features for
object-oriented design and code. C++ also provides some features, such as the
capability to associate functions with data structures that do not require the
use of class-based object-oriented techniques. For these reasons, the C++
language enables existing UNIX programs to migrate toward the adoption of
object orientation over time.
Support for C++ programming is provided by gcc, which you run with the
name g++ when you are compiling C++ code.
Using the C Programming Project
Management Tools Provided with Ubuntu
Ubuntu is replete with tools that make your life as a C/C++ programmer
easier. There are tools to create programs (editors), compile programs (gcc),
create libraries (ar), control the source (Git, Mercurial, Subversion),
automate builds (make), debug programs (gdb and ddd), and determine
where inefficiencies lie (gprof).