C Language Standards (C89 to C23)

Advanced
6 min read
Updated: Nov 2026
1 example

The C Standards Timeline

The C language is defined by ISO standards. C89/C90 is the classic baseline. C99 added // comments, mixed declarations, long long, bool, VLAs, inline, and designated initializers. C11 added _Static_assert, _Generic, threads, and atomics. C17 is a bug-fix release of C11. C23 adds bool as a keyword, nullptr, constexpr, and more. Choose with -std=.

Remember
gcc -std=c89 ...     /* ANSI C            */
gcc -std=c99 ...     /* C99               */
gcc -std=c11 ...     /* C11 (used here)   */
gcc -std=c17 ...     /* C17               */
gcc -std=c2x ...     /* C23 (draft name)  */

Cheat Sheet

Keep these facts handy while you work with Language Standards (C89 to C23) in C.

TopicDetail
C89No //, no long long
C99bool, VLAs, inline, restrict
C11_Static_assert, _Generic, <threads.h>
C23nullptr, constexpr, #embed

C Examples

Compile each example with gcc file.c -std=c11 -Wall -o out. Next: Data Structures.

Example 1 — C99 features in one program

Compile with -std=c99 or later.

C
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>

int main(void) {
    bool ok = true;                 /* C99 bool */

    for (int i = 0; i < 2; i++) {   // C99: declaration in for, // comments
        printf("i=%d ok=%d\n", i, ok);
    }
    printf("LLONG_MAX = %lld\n", LLONG_MAX);   /* C99 long long */
    return 0;
}

How It Works

  1. bool, true, and false come from <stdbool.h> in C99.
  2. Declaring i inside the for header is a C99 feature.
  3. long long is at least 64 bits, so the maximum is 9223372036854775807.

Edge Cases & Pitfalls

Check these before relying on Language Standards (C89 to C23) in real programs.

default

Relying on the default standard

GCC defaults to a GNU dialect that varies by version. Set -std= explicitly for repeatable builds.

msvc

MSVC support

Older MSVC versions support only parts of C99. Check your compiler, or use Clang on Windows.

Key Takeaways

  • Pick: choose -std= deliberately.
  • C11: good default.
  • Features: know what each adds.

One line: The C language is defined by ISO standards.

Frequently Asked Questions

C23 (ISO/IEC 9899:2024) is the latest. C17 is the previous one and mainly fixes defects in C11.
C11 or C17. They include everything from C99 plus useful additions like _Static_assert and are widely supported.
Continue with "C Data Structures" next. Learn what data structures are, how they are classified, and how to choose one for your C program. The C Advanced Concepts hub lists every topic in order.

Next: Data Structures

Learn what data structures are, how they are classified, and how to choose one for your C program.

Continue →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful