
- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion
C Programming Language Standard
In this problem, we will learn about the standards that are defined in the C programming language. These are those standard ways in which the program is to be ideally compiled by the compiler as defined by the development community.
To understand what I am saying take an easy example of a common C program that you all must have encountered and have seen the issue coming but haven’t got deep into it.
The main() function’s void return type −
See the following program −
void main() { //program code }
This program will run ok if we use the turbo c compiler but other compilers throw an error that the main cannot be void. So, which one is correct? The answer is mentioned in the standards.
What is the C programming language standard?
It is the standard way defined for the compiler creators about the compilation of the code. The latest C standard was released in June 2018 which is ISO/IEC 9899:2018 also known as the C11.
This 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?
Let’s see the example of main(), the standard way of declaring the main() function as depicted is with 0 or 2 parameters and with a return type of int.
Syntax
// No parameter int main() { /* code */ } // Two parameter int main(int argc, char *argv[]) { /* code */ }
There are a lot more standards in programming that might be violated by some compilers.
- Related Articles
- C++ Programming Language Features
- What is C++ programming language?
- Basics of C++ Programming Language?
- Comments in C++ Programming Language
- A C Programming Language Puzzle?
- Limitations of C programming language
- Why C++ is the Best Programming Language?
- What are macros in C programming language?
- What are the advantages of C++ Programming Language?
- Why files are needed in C programming language?
- Explain monolithic and modular programming in C language
- Explain array of pointers in C programming language
- Rust programming language – Applications
- What is Programming Language?
- What is Java programming language?
