C Programming Language Version | C Language

C Programming Language Version | C Language

  • C developed by Dennis Ritchie in1973 at Bell Labs, and used to re-implements the Unix operating systems.
  • It has sine become one of the most widely used programming language of all time, with C compilers from various vendors available for the majority of existing computer architectures and operating systems.
  • C has been standardized by the American National Standards Institute Since 1989 and subsequently by the International Organization for Standardization.
 C Programming Language Version

Table of Contents

K&R

  • K&R refers to the book “The C Programming Language” written by Brian Kernighan and Dennis Ritchie, which is often referred to as the “K&R” book. The book is a seminal text on the C programming language, and is widely regarded as one of the best programming books ever written.
  • The K&R book was first published in 1978, shortly after the release of the first version of the C language. It quickly became a best-seller and a standard reference for C programmers.
  • The book covers the basics of the C language, including data types, operators, control structures, functions, pointers, and arrays. It also includes a section on the standard library functions, and provides many examples and exercises to help readers learn the language.
  • One of the strengths of the K&R book is its concise and clear writing style. The authors explain complex concepts in a simple and accessible way, and provide many code examples to illustrate their points. The book also includes many tips and tricks for writing efficient and elegant C code.

C89

C89 (also known as ANSI C or ISO C) is the first standardized version of the C programming language, which was published by the American National Standards Institute (ANSI) in 1989. It replaced the original version of the language, which was created in the early 1970s by Dennis Ritchie at Bell Labs.
 
C89 introduced many important features to the language, including:
 
  • Standard library: C89 included a standard library of functions that provided common functionality like string manipulation, input/output operations, and math functions.
  • Function prototypes: C89 introduced function prototypes, which allowed programmers to declare the types of a function’s arguments and return value. This helped to catch errors and improve code readability.
  • Void pointers: C89 introduced the concept of void pointers, which allowed pointers to be used for generic data types.
  • New data types: C89 added several new data types, including the signed and unsigned variants of char, short, and long, and the float and double floating-point types.
C89 also standardized many existing features of the language, such as the use of the semicolon as a statement terminator, the use of curly braces to define code blocks, and the use of the # symbol for preprocessor directives.

C90

C90 (also known as ANSI C or ISO C) is the first standardized version of the C programming language, which was published by the American National Standards Institute (ANSI) in 1990. It is an updated version of the original C language, which was created in the early 1970s by Dennis Ritchie at Bell Labs.
 
C90 introduced many important features to the language, including:
  • Function prototypes: C90 introduced function prototypes, which allowed programmers to declare the types of a function’s arguments and return value. This helped to catch errors and improve code readability.
  • New data types: C90 added several new data types, including the signed and unsigned variants of char, short, and long, and the float and double floating-point types.
  • Void pointers: C90 introduced the concept of void pointers, which allowed pointers to be used for generic data types.
  • New operators: C90 added the && (logical AND), || (logical OR), and ! (logical NOT) operators, which made logical expressions easier to write.
C90 also standardized many existing features of the language, such as the use of the semicolon as a statement terminator, the use of curly braces to define code blocks, and the use of the # symbol for preprocessor directives.

C95

  • There is no official version of C95. The next standard after C90 was the C99 standard, which was published in 1999.
  • While C95 is not an official standard, some books and tutorials may use this term to refer to the language features added between C90 and C99. However, it is important to note that there is no formal specification for C95, and any code written using these features may not be portable across different compilers or platforms.

In addition to the amendment, two technical corrigenda were published by ISO for C90:

  • ISO/IEC 9899 TCOR1 in 1995
  • ISO/IEC 9899 TCOR2 in 1996

Preprocessor Test for C95 compatibility

#if defined(__STDC_VERSION__) && __STDC_Vangerous ERSION__ > 199409L
      /* C95 compatible source code.  */
#elif defined(__ANSI__)
      /* C89 compatible source code.  */
#endif
Check out: Features of C Language | Programming

C99

C99 (also known as ISO/IEC 9899:1999) is a version of the C programming language that was standardized by the International Organization for Standardization (ISO) in 1999. It is the third major revision of the C language after C89 and C90.
 
C99 introduced many new features to the language, including:
  • Inline functions: C99 introduced the inline keyword, which allows functions to be defined inline, reducing the overhead of function calls.
  • Variable-length arrays: C99 added support for arrays whose size is determined at runtime, rather than at compile time.
  • Complex numbers: C99 added support for complex numbers, which are represented as a pair of floating-point values.
  • Flexible array members: C99 introduced the concept of flexible array members, which allow the last element of a struct to be an array of unspecified size.
  • New data types: C99 introduced several new data types, including the long long integer type, the bool type, and the uintptr_t and intptr_t types, which provide a portable way to work with pointers.
  • Improved support for comments: C99 added support for nested comments and added new ways to format comments.
  • New control flow statements: C99 added the ability to declare variables inside for loops, and added the do/while loop to the language.

Three technical corrigenda were published by ISO for C99:

  • ISO/IEC 9899:1999/Cor.1:2001(E)
  • ISO/IEC 9899:1999/Cor.2:2004(E)
  • ISO/IEC 9899:1999/Cor.3:2007(E)
A standard macro __STDC_VERSION__ is defined with value 199901L to indicate that C99 support is available.

C11

C11 (also known as ISO/IEC 9899:2011) is the latest version of the C programming language, which was standardized by the International Organization for Standardization (ISO) in 2011. It is the fourth major revision of the C language after C89, C90, and C99.
 
C11 introduced several new features to the language, including:
  • Static assert: C11 added a new static assert keyword, which allows programmers to check assertions at compile time.
  • Thread-local storage: C11 added a new thread_local keyword, which allows variables to be declared as thread-local.
  • Improved Unicode support: C11 added new features to improve support for Unicode, including support for UTF-16 and UTF-32 character and string literals.
  • New library functions: C11 added several new library functions, including functions for aligned memory allocation and for handling complex numbers.
  • Atomic operations: C11 added support for atomic operations, which allow programmers to write thread-safe code without the need for locks or other synchronization primitives.
  • Type generic expressions: C11 added support for type generic expressions, which allow functions to be defined with generic types that can work with any data type.
  • Multi-threading support: C11 added new library functions to support multi-threading, including functions for creating and joining threads.
C11 also made several other changes to the language, such as introducing a new memory model to improve support for multicore processors, and adding new syntax for defining compound literals.

C17

C17 (also known as ISO/IEC 9899:2017) is a version of the C programming language that was standardized by the International Organization for Standardization (ISO) in 2017. It is the fifth major revision of the C language after C89, C90, C99, and C11.
 
C17 introduced several new features to the language, including:
  • Alignment specification :- C17 added new syntax for specifying the alignment of variables and types.
  • New library functions :- C17 added several new library functions, including functions for handling errors, for searching and sorting arrays, and for converting integers to decimal strings.
  • Improved support for Unicode :- C17 added new features to improve support for Unicode, including support for Unicode 8.0 and for UTF-8 character and string literals.
  • Removal of certain deprecated features :- C17 removed certain features that had been deprecated in previous versions of the language, such as the gets() function and the gets() family of functions.
  • New syntax for initialization :- C17 added new syntax for aggregate initialization and designated initialization, which makes it easier to initialize structs and arrays.
  • Improvements to the memory model :- C17 introduced several improvements to the memory model, including changes to the behavior of volatile variables and improvements to the interaction between atomic operations and memory barriers.

C17 also made several other changes to the language, such as adding support for hexadecimal floating-point literals and adding new syntax for function parameters.

Also Read: History of C language

1 thought on “C Programming Language Version | C Language”

Leave a Comment