What’s the difference between C and C99?

Asked

Viewed 2,959 times

6

I saw C99 in text and I was curious there is some difference between normal C and C99?

  • 2

    https://en.wikipedia.org/wiki/C99

  • Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).

1 answer

11

C is the language. In 84, if I’m not mistaken, it officially became ANSI.

In '89 she had her specification ratified worldwide and some people call it C89. In 99 there was an update of this specification called C99 and another in 2011 called C11, finally we arrived at the C18, which is almost irrelevant.

Compilers should conform to one of the specifications and say this.

A draft hers.

Obviously each revision puts new features (good, C11 left some before mandatory as optional, and made obsolete some others).

Some examples of novelties added to it:

  • Online functions
  • Removal of restrictions on the location of the variable declaration (as in C++)
  • Addition of various new data types, including the long long int (to minimize problems in the 32-bit to 64-bit transition), a type of data boolean explicit (called _Bool) and a guy complex representing complex numbers
  • Variable-length data vectors (the vector may have a different size for each execution of a function, but does not grow after creation)
  • Official support for one-line comments initiated by //, borrowed from the C language++
  • Several new library functions such as snprintf()
  • Various new header files such as stdint.h

More.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.