C Standards

C Standards are the language standards that define rules of this language.

  • K & R C (book published in 1978)
  • ANSI C or C89
  • C99
  • C11
  • C17
  • C2x

Compilers : GCC C, Microsoft Visual C++, Oracle C compiler, CLang compiler, etc

C standard

The latest C standard is ISO/IEC 9899:2018, also known as C17 as the final draft was published in 2018. Before C11, there was C99. The C11 final draft is available here. See this for a complete history of C standards.

Can we know behavior of all programs from C standard? 

C standard leaves some behavior of many C constructs as undefined and some as unspecified to simplify the specification and allow some flexibility in implementation. For example, in C the use of any automatic variable before it has been initialized yields undefined behavior and order of evaluations of subexpressions is unspecified. This specifically frees the compiler to do whatever is easiest or most efficient, should such a program be submitted.

As a programmer, it is never a good idea to use programming constructs whose behavior is undefined or unspecified, such programs should always be discouraged. The output of such programs may change with the compiler and/or machine.