A Brief history of the C Programming Language
A Brief History of the C Programming Language
1972-Present
C is a general-purpose, procedural programming language developed by Dennis Ritchie in the bell laboratory in 1972. It supports structural programming, lexical variable scope, and recursion with a static type system. The language was created to ease coding in the Unix operating system, but gradually it becomes a versatile programming language. Numerous programming languages including popular languages like Java, C++, Perl, PHP, JavaScript, Python.
C programming language is a cross-platform programming language, which enables it to run its code on any operating system. The popularity of the language boomed in the ‘70s and ‘80s, and some versions of the language were created. C programming language was standardized by ANSI (American National Standard Institute) and by the International Organization for Standardization (ISO) in 1989, which created ANSI C in 1989. ISO took ANSI C (also known as C90) as the standard C programming language. C89 was also equivalent to C90. In 1995 ISO updated C90 and later introduced it as C99 in 1999. The stable release of C was in 2018, known as C18 (ISO/IEC 9899:2018), which is supported by at least GCC as of 8.1, Clang as of 6.0, Pelles C as of 9.0.
The name “C” was derived from the programming language named BCPL, which was created by Martin Richards in 1966. It is an effectual successor of the programming language “B”. Around the ‘60s Flowmatic, A2, Fortran, and many more programming languages were designed for variant reasons, but soon developers understood the importance of a programming language capable of handling every branch of programming, which gave birth to two languages named ALGOL 60 and CPL, unfortunately, they were hard to understand, so they couldn’t get the work done. Then BCPL was created but t was less powerful to specify and type less. Then scientist Ken Thompson designed “B” in the Bell labs, but that was typeless too. Then Dennis Ritchie developed the “C” programming language, filtering various problems from “B”.
C is an imperative procedural language. It was designed to be compiled to provide low-level access to memory and language constructs that map efficiently to machine instructions, all with minimal runtime support. Despite its low-level capabilities, the language was designed to encourage cross-platform programming. A standards-compliant C program written with portability in mind can be compiled for a wide variety of computer platforms and operating systems with few changes to its source code.
As of January 2021, C was ranked first in the TIOBE index, a measure of the popularity of programming languages, moving up from the second spot the previous year.
History
K&R C
In 1978, Brian Kernighan and Dennis Ritchie published the first
edition of The C
Programming Language. This book, known to C programmers
as K&R, served for many years as an informal specification of
the language. The version of C that it describes is commonly referred to as
"K&R C". As this was released in 1978, it is also referred
to as C78. The second edition of the book covers
the later ANSI C standard, described below.
K&R introduced several language features:
·
Standard I/O (Input/Output) library
·
long int
datatype
·
unsigned int
data
type
·
Compound assignment
operators of the form =op
(such
as =-
) were changed to the form op
=
(that is, -=
) to
remove the semantic ambiguity created by constructs such as i=-10
, which
had been interpreted as i =- 10
(decrement i
by
10) instead of the possibly intended i = -10
(let i
be
−10).
Even after the publication of the 1989 ANSI standard, for many
years K&R C was still considered the "lowest
common denominator" to which C programmers restricted
themselves when maximum portability was desired, since many older compilers
were still in use, and because carefully written K&R C code can be legal
Standard C as well.
In early versions of C, only functions that return types other
than int
must be declared if used
before the function definition; functions used without prior declaration were
presumed to return type int
.
The int
type
specifiers which are commented out could be omitted in K&R C, but are
required in later standards.
Since K&R function declarations did not include any
information about function arguments, function parameter type checks were
not performed, although some compilers would issue a warning message if a local
function was called with the wrong number of arguments, or if multiple calls to
an external function used different numbers or types of arguments. Separate
tools such as Unix's lint (programming tool) utility were developed that (among
other things) could check for consistency of function use across multiple
source files.
In the years following the publication of K&R C, several
features were added to the language, supported by compilers from AT&T (in
particular PCC- Portable C Compiler) and some other vendors. These included:
·
void
functions
(i.e., functions with no return value)
·
functions returning struct
or union
types (rather than
pointers)
·
assignment for struct
data
types
·
enumerated types
The large number of extensions and lack of agreement on a standard library, together with the language
popularity and the fact that not even the Unix compilers precisely implemented
the K&R specification, led to the necessity of standardization.
ANSI C
and ISO C
During the late 1970s and 1980s, versions of C were implemented
for a wide variety of mainframe computers, minicomputers, and microcomputers, including the IBM
PC, as its popularity began to increase significantly.
In 1983, the American National Standards Institute (ANSI) formed a committee, X3J11, to establish a standard specification of C. X3J11 based the C standard on the Unix implementation; however, the non-portable portion of the Unix C library was handed off to the IEEE working group 1003 to become the basis for the 1988 POSIX (The Portable Operating System Interface)standard. In 1989, the C standard was ratified as ANSI X3.159-1989 "Programming Language C". This version of the language is often referred to as ANSI C, Standard C, or sometimes C89.
In 1990, the ANSI C standard (with formatting changes) was
adopted by the International
Organization for Standardization (ISO) as ISO/IEC 9899:1990,
which is sometimes called C90. Therefore, the terms "C89" and
"C90" refer to the same programming language.
ANSI, like other national standards bodies, no longer develops
the C standard independently, but defers to the international C standard,
maintained by the working group ISO/IEC JTC1/SC22/WG14. National adoption of
an update to the international standard typically occurs within a year of ISO
publication.
One of the aims of the C standardization process was to produce
a superset of K&R C, incorporating many
of the subsequently introduced unofficial features. The standards committee
also included several additional features such as function prototypes (borrowed
from C++), void
pointers, support
for international character sets and locales,
and preprocessor enhancements. Although the syntax for parameter declarations was
augmented to include the style used in C++, the K&R interface continued to
be permitted, for compatibility with existing source code.
C89 is supported by current C compilers, and most modern C code
is based on it. Any program written only in Standard C and without any
hardware-dependent assumptions will run correctly on any platform with
a conforming C implementation, within its resource limits. Without such precautions,
programs may compile only on a certain platform or with a particular compiler,
due, for example, to the use of non-standard libraries, such as GUI libraries,
or to a reliance on compiler- or platform-specific attributes such as the exact
size of data types and byte endianness.
In cases where code must be compilable by either standard-conforming
or K&R C-based compilers, the __STDC__
macro
can be used to split the code into Standard and K&R sections to prevent the
use on a K&R C-based compiler of features available only in Standard C.
After the ANSI/ISO standardization process, the C language
specification remained relatively static for several years. In 1995, Normative
Amendment 1 to the 1990 C standard (ISO/IEC 9899/AMD1:1995, known informally as
C95) was published, to correct some details and to add more extensive support for
international character sets.
C99
The C standard was further revised in the late 1990s, leading to
the publication of ISO/IEC 9899:1999 in 1999, which is commonly referred to as
"C99". It has since been amended three
times by Technical Corrigenda.
C99 introduced several new features, including inline functions, several new data types (including long long int
and a complex
type to represent complex numbers), variable-length
arrays and flexible array
members, improved support for IEEE 754 floating point, support
for variadic macros (macros
of variable arity), and support for one-line comments
beginning with //
, as
in BCPL or C++. Many of these had already
been implemented as extensions in several C compilers.
C99 is for the most part backward compatible with C90, but is
stricter in some ways; in particular, a declaration that lacks a type specifier
no longer has int
implicitly
assumed. A standard macro __STDC_VERSION__
is
defined with value 199901L
to
indicate that C99 support is available. GCC, Solaris Studio,
and other C compilers now support many or all of the new features of C99. The C
compiler in Microsoft Visual C++,
however, implements the C89 standard and those parts of C99 that are required
for compatibility with C++11. In addition,
support for Unicode identifiers (variable / function
names) in the form of escaped characters (e.g. \U0001f431
) is now required. Support for
raw Unicode names is
optional.
C11
In 2007, work began on another revision of the C standard,
informally called "C1X" until its official publication on 2011-12-08.
The C standards committee adopted guidelines to limit the adoption of new
features that had not been tested by existing implementations.
The C11 standard adds numerous new features to C and the
library, including type generic macros, anonymous structures, improved Unicode
support, atomic operations, multi-threading, and bounds-checked functions. It
also makes some portions of the existing C99 library optional, and improves
compatibility with C++. The standard macro __STDC_VERSION__
is
defined as 201112L
to indicate that
C11 support is available.
C17
Published in June 2018, C17 is the current standard for the C
programming language. It introduces no new language features, only technical
corrections, and clarifications to defects in C11. The standard macro __STDC_VERSION__
is defined as 201710L
.
C2x
C2x is an informal name for the next (after C17) major C
language standard revision. It is not expected to be voted on until December
2021.
Embedded C
Historically, embedded C programming requires nonstandard
extensions to the C language in order to support exotic features such as
fixed-point arithmetic, multiple distinct memory banks, and basic I/O
operations.
In 2008, the C Standards Committee published a technical report extending the C language to
address these issues by providing a common standard for all implementations to
adhere to. It includes a number of features not available in normal C, such
as fixed-point
arithmetic, named address spaces, and basic I/O hardware addressing.
Post a Comment