2024-03-29.

A brief reference for the differences between C standards. Source#K&R_C)

K&R C (1972-1989)

Anything before standardisation was called K&R C as per the first edition of the book that was the de facto implementation at the time. The book came out at 1978, so sometimes this implementation is also referred to as C78.

The following language features were introduced by the book:

C functions that returned an int could be declared without the int keyword upfront as it was implicit that they returned int.

/* K&R */
long function_that_returns_long();
function_that_returns_int();

/* newer standards */
long function_that_returns_long();
int function_that_returns_int();

Function declarations also had an implicit int return when the return type was not specified:

/* K&R */
function_that_returns_int() {
  return 10;
}

/* newer standards */
int function_that_returns_int() {
  return 10;
}

Function declarations also didn't include information about function arguments. This means that function parameter type checks were not performed. Some compilers would still raise a warning if the function was called with the wrong number of arguments or if different calls to the same function had different numbers of arguments.

After the book publication and before C89, several compilers added other features to the language:

C89 (ANSI / ISO C)

The goal of this standards was to create a superset of K&R out of the many unofficial features, such as:

C99

The following functionalities were introduced in this new version of the standard:

C11

C17

C17 fixes numerous minor defects in C11 without introducing new language features.

(Extra) Embedded C

Embedded C is a set of language extensions for the C programming language by
the C Standards Committee to address commonality issues that exist between C
extensions for different embedded systems.

These include: