Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

Introduction to the C99 Programming Language : Part III

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Kindly read Introduction to the C99 Programming Language (Part I) and Introduction to the C99 Programming Language (Part II) before reading this article.

  1. Addition of Library Functions: C99 provides some Additional Library functions listed below.
    Library FunctionUsage
    complex.hcomplex.h supports complex arithmetic
    fenv.hfenv.h gives access to floating point tags and floating point environments.
    inttypes.hinttypes.h gives support to handle long numbers (larger width numbers).
    It defines a standard, portable integer names
    iso646.hiso646.h defines macros corresponds to operators like && and ^
    stdbool.hstdbool.h supports boolean data types.
    It gives macros like bool, true and false.
    stdint.hstdint.h is included in inttypes.h header file.
    It gives standard, portable set of integer names.
    tgmath.htgmath.h defines type-generic floating-point macors
    wchar.hwchar.h supports multibyte and wide character functions.
    wctype.hwctype.h supports multibyte and wide character classification functions.
  2. 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.

    int main()
        long long int a=1121231456;
        unsigned long long int b=1124154632;
        printf("Long Number: %lld and"
    " Unsigned long: %llu",
     a, b);

  3. __func__ Identifier:
    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.

  4. 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.

  5. 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.

  6. Extended Integer Types: C99 standard gave several extensions to integer types.
    Extended TypeMeaning
    int16_tInteger has exactly 16 bits
    int_least16_tInteger has at least 16 bits.
    int_fast32_tFastest Integer types that has at least 32 bits.
    intmax_tHolds the Largest Integer Type
    uintmax_tHolds 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.

My Personal Notes arrow_drop_up
Last Updated : 14 Feb, 2020
Like Article
Save Article
Similar Reads