Kindly read Introduction to the C99 Programming Language (Part I) and Introduction to the C99 Programming Language (Part II) before reading this article.
Addition of Library Functions: C99 provides some Additional Library functions listed below.
Library Function Usage complex.h complex.h supports complex arithmetic fenv.h fenv.h gives access to floating point tags and floating point environments. inttypes.h inttypes.h gives support to handle long numbers (larger width numbers).
It defines a standard, portable integer names
iso646.h iso646.h defines macros corresponds to operators like && and ^ stdbool.h stdbool.h supports boolean data types.
It gives macros like bool, true and false.
stdint.h stdint.h is included in inttypes.h header file.
It gives standard, portable set of integer names.
tgmath.h tgmath.h defines type-generic floating-point macors wchar.h wchar.h supports multibyte and wide character functions. wctype.h wctype.h supports multibyte and wide character classification functions.
Addition of Format Specifiers: In C99 Standard, printf() and scanf() functions are modified in such a way that they have ability to handle modifiers long long and unsigned long long. The format specifier of long long int is ll and unsigned long long int is ul.
The below sample program demonstrates the use of long long and unsigned long long values.
"Long Number: %lld and"
" Unsigned long: %llu"
C99 adds __func__ identifier which returns the name of the function invoked as string. In simple, if __func__ is called in function fun1() then it returns the string fun1.
Implicit int Declarations:
In C89 standard, we don’t need an explicit declaration of integer return type in functions i.e If we declare function_name(parameters), the compiler will assume the integer as default return type. In C99, All implicit function declarations are no longer supported. Some compiler will raise errors while some shows the same error as warning. GCC compiler shows that as a warning.
Void Return Types:
In C89 Standard, we can omit return values for functions. If we write int fun1() and execute it without specifying return value, the compiler will execute automatically by taking default return value. This value can either be 0 or garbage value. But in C99, If we write int fun1() without return statement in it then the compiler treats that as an error.
Extended Integer Types: C99 standard gave several extensions to integer types.
Extended Type Meaning int16_t Integer has exactly 16 bits int_least16_t Integer has at least 16 bits. int_fast32_t Fastest Integer types that has at least 32 bits. intmax_t Holds the Largest Integer Type uintmax_t Holds the Largest unsigned Integer Type
These are generally used rarely.
These are some of the major changes that include addition, change and deletion of features in C89 to get C99 Standard.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Introduction to the C99 Programming Language : Part I
- Introduction to the C99 Programming Language : Part II
- Difference Between C Language and LISP Language
- C Language Introduction
- C Programming Language Standard
- A C Programming Language Puzzle
- Benefits of C language over other programming languages
- Swift Programming Language
- Which Programming Language to Choose?
- Which Programming Language Should I Choose as a Beginner?
- Features of C Programming Language
- Introduction to Swift Programming
- Introduction to Programming Languages
- Introduction of Object Oriented Programming
- Difference between Functional Programming and Object Oriented Programming
- Arrays in C Language | Set 2 (Properties)
- Convert C/C++ code to assembly language
- Signals in C language
- Constants vs Variables in C language
- Difference between %d and %i format specifier in C language
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.