Written in front: K&r C needless to say. personally think, we usually say standard C, refers to ANSI C,iso C,C89,C90.
K&r C
In 1978, Dennis Ritchie (Dennis Ritchie) and Blaine Collingham (Brian Kernighan) collaborated in the publication of the first edition of the C programming language. The C language standard introduced in the book is also called "K&r C" by the C language programmer, and the second edition contains some ANSI C standards. K&r c mainly introduces the following features:
- Structure (struct) type
- A long integer (length int) type
- unsigned integer (unsigned int) type
- Change the operators =+ and =-to + = and-=. Because =+ and =-make the compiler unaware that the user is handling i = 10 or I =-10, the processing is confusing.
Even after many years since the ANSI C standard was introduced, K&r C is still the minimum standard requirement for many compilers, and many old compilations still run the K&r C standard.
ANSI C and ISO C
The first standard of C is published by ANSI. Although the document was later adopted by the International Organization for Standardization (ISO) and the revised ISO release was also adopted by ANSI, the name ANSI C (rather than ISO c) is still widely used. ANSI C is now supported by almost all widely used compilers. Most C code is now written on the basis of ANSI C.
C89 and C90
In 1983, the American National Standards Association formed a committee, X3J11, to create a set of standards for C. After a long and arduous process, the standard was completed in 1989 and formally entered into force as ANSI x3.159-1989 "Programming Language C". This version of the language is often referred to as "ANSI C", or sometimes referred to as "C89" (in order to differentiate C99). In 1990, the ANSI C standard (with some minor changes) was adopted by the National Standards Institute as ISO/IEC 9,899:1990. This version is sometimes called C90 or ISO C. As a result, C89 and C90 usually refer to the same language. Improvements to the traditional C language to Ansi/iso standard C include:
- Added a true standard library
- New pre-processing commands and features
- Function prototypes allow parameter types to be specified in function declarations
- Some new keywords, including const, volatile and signed wide characters, wide strings and byte multiple characters
- Many minor changes and clarifications to convention rules, declarations, and type checking
C99
In March 2000, ANSI adopted the ISO/IEC 9,899:1999 standard. This standard usually refers to C99. C99 has added features such as:
- Supports an array of indefinite length, that is, the length of the array can be determined at run time.
- A variable declaration does not have to be placed at the beginning of a statement block, and the For statement advocates the form of a for (int i=0;i<100;++i), where I is only valid within a for statement block.
- Allows assigning a value to a specific element when the structure is initialized.
- An expression that allows the compiler to simplify the number of very few.
- The default of the function return type to int is canceled.
But each company's support for C99 has shown a different interest. When GCC and some other commercial compilers supported most of C99 's features, Microsoft and Borland seemed uninterested, and they focused more on C + +.
C11
In December 2011, ANSI adopted the ISO/IEC 9,899:2011 standard. This standard is usually C11, which is the latest standard for C programming languages.
C language Standard