7

I'm a beginner, so please let me know the difference between ANSI C and the C programming Language.

3
  • 1
    If you're a beginner, this is unimportant historical information you should completely ignore. It will only distract you. Aug 2, 2014 at 16:17
  • You might like to read here: en.wikipedia.org/wiki/C_%28programming_language%29#History Related also: stackoverflow.com/q/22500/694576
    – alk
    Aug 2, 2014 at 16:19
  • You can read the C89 rationale, which explains, why certain things were changed (and by that tells you what was changed). Probably the most important changes: function prototypes (look for old-style or K&R function declarations and definitions if you're interested) and the preprocessor (which varied a lot between different implementations).
    – mafso
    Aug 2, 2014 at 16:23

1 Answer 1

18

ANSI is a US standards body that released the first standard specification for C in 1989. The standard was adopted by ISO in 1990 and ISO are now the standards body for the language - not ANSI.

ANSI C merely refers to a particular standard for the C Programming Language - i.e. there is no difference, they refer to the same thing. However there have been several standards and de-facto standards for C:

  • K&R C - as defined by the first edition of The C Programming Language by Brian Kernhigan and Dennis Ritchie, published in 1978.
  • ANSI C - 1989 (also known as C89). Described (but no longer defined) by K&R 2nd Ed.
  • ISO C 1990 (C90 - more-or-less identical to C89, but in an ISO document).
  • ISO C 1999 (C99)
  • ISO C 2011 (C11)
3
  • 4
    While a lot of people think of ANSI C as C89, C11 has also been ratified by ANSI and technically ANSI C is actually C11.
    – ouah
    Aug 2, 2014 at 16:47
  • 4
    @ouah : Which only serves to make the term ANSI C even more ambiguous and best avoided. Besides it is not quite true; C90 was ratified by ANSI, C99 and C11 were adopted. The ISO C standards committee is an international body - it would be rather parochial to claim it as "American". It is also adopted by by the British Standards Institute, but no one would refer to it as BSI C! In a more practical sense the -ansi switch in GCC enforces C90.
    – Clifford
    Aug 3, 2014 at 7:01
  • 1
    Note that since writing those there is a ISO C17 and a C2x in development - I am not going to maintain this answer, - you get the point.
    – Clifford
    Mar 8, 2021 at 17:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.