
- C - Home
- C - Overview
- C - Features
- C - History
- C - Standards
- C - Environment Setup
- C - Program Structure
- C - Hello World
- C - Compilation Process
- C - Comments
- C - Basic Syntax
- C - User Input
- C - printf Function
- C - Format Specifiers
- Lexical Elements in C
- C - Tokens
- C - Keywords
- C - Identifiers
- Variables and Constants
- C - Variables
- C - Constants
- C - Const Qualifier
- C - Linkage
- Data Types and Type Conversions
- C - Data Types
- C - Literals
- C - Escape sequences
- C - Booleans
- C - Integer Promotions
- C - Character Arithmetic
- C - Type Conversion
- C - Type Casting
- Operators in C
- C - Operators
- C - Arithmetic Operators
- C - Unary Operators
- C - Relational Operators
- C - Logical Operators
- C - Bitwise Operators
- C - Assignment Operators
- C - Increment and Decrement Operators
- C - Ternary Operator
- C - sizeof Operator
- C - Operator Precedence
- C - Miscellaneous Operators
- Decision Making & Control Statements
- C - Decision Making
- C - if statement
- C - if...else statement
- C - Nested if statements
- C - Switch statement
- C - Nested switch statements
- Loops in C
- C - Loops
- C - For Loop
- C - While Loop
- C - Do...while Loop
- C - For Loop vs While Loop
- C - Nested Loop
- C - Infinite Loop
- C - Break Statement
- C - Continue Statement
- C - Goto Statement
- Functions in C
- C - Functions
- C - Main Function
- C - Function call by Value
- C - Function call by reference
- C - Nested Functions
- C - Variadic Functions
- C - User-Defined Functions
- C - Callback Function
- C - Return Statement
- C - Recursion
- Scope Rules in C
- C - Scope Rules
- C - Static Variables
- C - Global Variables
- Arrays in C
- C - Arrays
- C - Properties of Array
- C - Multi-Dimensional Arrays
- C - Passing Arrays to Function
- C - Return Array from Function
- C - Variable Length Arrays
- Strings in C
- C - Strings
- C - Array of Strings
- C - Special Characters
- Structures and Unions in C
- C - Structures
- C - Structures and Functions
- C - Arrays of Structures
- C - Self-Referential Structures
- C - Dot (.) Operator
- C - Lookup Tables
- C - Enumeration (or enum)
- C - Structure Padding and Packing
- C - Nested Structures
- C - Anonymous Structure and Union
- C - Unions
- C - Bit Fields
- C - Typedef
- Pointers in C
- C - Pointers
- C - Pointers and Arrays
- C - Applications of Pointers
- C - Pointer Arithmetics
- C - Array of Pointers
- C - Pointer to Pointer
- C - Function Pointers
- C - Passing Pointers to Functions
- C - Return Pointer from Functions
- C - Pointer to an Array
- C - Pointers vs. Multi-dimensional Arrays
- C - Character Pointers and Functions
- C - NULL Pointer
- C - void Pointer
- C - Dangling Pointers
- C - Dereference Pointer
- C - Near, Far and Huge Pointers
- C - Pointers to Structures
- C - Chain of Pointers
- C - Pointer vs Array
- C - Initialization of Pointer Arrays
- Storage Classes and Qualifiers
- C - Storage Classes
- Memory Management in C
- C - Memory Management
- C - Memory Address
- Preprocessors in C
- C - Preprocessors
- C - Pragmas
- C - Preprocessor Operators
- File Handling in C
- C - File I/O (File Handling)
- C - Input & Output
- Constants and Literals in C
- C - Macros
- C - Header Files
- Miscellaneous Topics
- C - Error Handling
- C - Variable Arguments
- C - Command Execution
- C - Math Functions
- C - Static Keyword
- C - Random Number Generation
- C - Command Line Arguments
- C Programming Resources
- C - Questions & Answers
- C - Quick Guide
- C - Cheat Sheet
- C - Useful Resources
- C - Discussion
- C Online Compiler
C - Standards (ANSI, ISO, C99, C11, C17)
A programming language standard is typically a set of specifications that precisely define the programming language syntax and semantics (i.e., the rule of writing the code, what the code means and how it behaves when executed).
The C programming language standard defines the behavior of the program, i.e., How the program will ideally run? What are the correct ways and definitions of some in-built functions? The standard works as a definitive "contract" between the programmers and the language implementers to ensure a certain level of consistency on how a language should work across different software.
Standardized Versions of C Programming Language
Some of the most commonly used C Standards are listed below −
- C89 / ANSI C (1989) - C90 (ISO 1990) − It was the first standardized versions of the C language. In this, version new features were added such as function prototypes, standard library, const, volatile, enum.
- C95 Amendment − Introduced wide character library (h) for better support of international character sets, and provided iso646.h to provide alternative spellings for C operators (like and, or, not) to improve code readability and portability.
- C99 (1999) − Introduced several new features lncluded long long int, stdbool.h, variable length arrays, flexible array members, inline functions, complex numbers, and // comments.
- C11 (2011) − It introduced several new features including _Generic, static_assert, and the atomic type qualifier <stdatomic.h>, also addition of multithreading <threads.h>, Unicode (char16_t, char32_t) and memory manipulation.
- C17 (2017/2018) − In this version, only bug fixes to C11, no new features were added.
- C18 (2018) − Maintenance release, identical to C17 in practice.
- C23 (latest) − It is the latest version of C that better supports the const qualifier and addition of the new keywords, attributes, typeof, improved Unicode, and contracts.
The following table compares and contrasts the important features of different C standards −
Features | K&R C | C89/C90 | C99 | C11 | C17/C18 | C23 |
---|---|---|---|---|---|---|
Function Prototype | No | Yes | Yes | Yes | Yes | Yes |
// Comments | No | No | Yes | Yes | Yes | Yes |
Long long int | No | No | Yes | Yes | Yes | Yes |
Multithreading | No | No | No | Yes | Yes | Yes |
Atomics | No | No | No | Yes | Yes | Yes |
Unicode Support | No | No | Limited | Yes | Yes | Yes |
Advantages of Having Standards in Programming Languages
It is important to have Standards because they ensure uniformity in Syntax and Semantics, and reduce ambiguity by promoting consistency in any programming language −
- Syntax − The grammatical rules that make a meaning and create valid programs by combining the statement keywords and symbols.
- Semantics − Semantics are the set of rules that determines the meaning and execution behavior of the code written in the language. This includes the control flow of the programs how data is processed, and how memory is managed.
- Consistency − The standard makes sure that different compilers and interpreters for the same language give consistent results, making code more portable and predictable.
- Ambiguity Reduction − Ambiguity is something that can be understood in more than one way. In the C programming language, where the compiler cannot uniquely identify which specific identity (like a function, variable, or member) is being referred to due to multiple possible interpretations, it is ambiguity.
By providing precise definition and standards, which minimize ambiguities and undefined behavior, one can avoid different interpretations or errors when running the code.
Role of ANSI and ISO in C standardization
In the early days (k&R C), different compilers (AT&T, DEC, HP, etc.) implemented their own versions of C. It caused incompatibility: a program written for one compiler often would not compile and behave the same way on another. Therefore, C needed a formal standard to ensure that a program would have portability, reliability, and consistency.
ANSI’s Role (American National Standards Institute)
ANSI formed the X3J11 committee in 1983 to develop the standard specification for the C language. After the Several years of work they published C89 (ANSI C in 1989). After the development of C89 the ANSI C become the foundation on which all future was built.
Following is the key contribution of the ANCI C (C89):
- Defined function prototypes and type checking.
- Introduced const, volatile, signed, and void
- Standardized the C Standard Library (h, stdlib.h, string.h, etc.).
- Removed ambiguities from K&R C, making C more portable.
ISO’s Role (International Organization for Standardization)
The standard was submitted to the ISO/IEC JTC1/SC22/WG14 committee after the ANSI published C89. So, ISO adopted ANSI C in 1990, with the minor changes known as C90.
ISO became the prime authority responsible for maintaining and revising the C language standard (C95, C99, C11, C17, C18, C23). ISO ensures that the standard is globally recognized, so C remain platform-independent and works with a wide range of compilers and operating systems.
Relationship between ANSI and ISO
ANSI is a national standard; it is US based. In contrast, ISO is international standard; it is a global standard. The version C89 (ANSI) and C90 (ISO) are essentially the same standard, with only minor editorial differences.
Nowadays, most people refer to the ISO versions (C99, C11, C17, C23), but the foundation was laid by ANSI’s work.
Importance of Standards in Real-World Applications
Standards offer the following advantages in real-world application scenarios −
- Ensure portability of code across platforms − Standardized C make sure that the same code runs on the different compilers, and hardware without modifications.
- Help large teams and open-source projects avoid inconsistencies − A common standard prevents teams from writing compiler-specific code, making collaboration and code sharing easier.
- Provide backward compatibility − New standards retain of the older features, so legacy programs can still compile and run on modern compilers.
Conclusion
The C standards introduced by the ANSI and ISO make the C language portable, reliable, and consistent across platforms. Each version, from C89 to C17, improved its features while keeping backward compatibility. Standardization ensures that C remains widely used in educational institutions, industry, and system programming, making it a powerful and stable language.