C Language Introduction

Last Updated : 8 Jun, 2026

C is a general-purpose programming language developed by Dennis Ritchie at Bell Labs in 1972. It is one of the most widely used programming languages and forms the foundation of many modern programming languages.

  • Supports procedural and structured programming.
  • Fast execution speed and low-level memory access capabilities.
  • Widely used in operating systems, embedded systems, compilers, and system software development.
the_main_features_of_the_c_language
Features

First C Program

This simple program demonstrates the basic structure of a C program.

C
#include <stdio.h>
int main(void)
{
    // This prints "Hello World"
    printf("Hello World");
    return 0;  
}

Output
Hello World

Structure of the C program

The structure of a C program is as follows:

c_program_execution
  • Header File: #include <stdio.h> includes standard input/output functions such as printf() and scanf(). Other common headers include string.h, math.h, and stdlib.h.
  • Main Function: int main() is the entry point of a C program. Program execution starts from this function and returns an integer value using return 0.
  • Comments: // is used for single-line comments and /* ... */ for multi-line comments. Comments are ignored by the compiler and are used for documentation.
  • Statements: Statements contain executable instructions. Here, printf("Hello, World!"); displays text on the screen.
  • Return Statement: return 0; terminates the main() function and indicates successful execution of the program.

How to Run the Above Code?

C
Execution of C
  • Write the code in a file such as HelloWorld.c.
  • Use a C compiler such as GCC, Clang, or MSVC to compile the source code.
  • The compiler converts the source code into an executable file.
  • The operating system loads the executable file into memory.
  • The CPU executes the program instructions starting from the main() function.
  • The program displays the output on the screen.

Application of CĀ Language

C language is being used since the early days of computer programming and still is used in wide variety of applications such as:

  • Operating Systems: Used for developing operating systems such as Linux and UNIX due to its efficiency and hardware-level access.
  • Embedded Systems: Widely used in microcontrollers, IoT devices, and consumer electronics.
  • System Software: Used to develop device drivers, assemblers, linkers, and system utilities.
  • Compiler Development: Many compilers and interpreters are written in C because of its performance and portability.
  • Database Systems: Used in database engines for efficient data storage and processing.
  • Game Development: Used for developing game engines and performance-critical gaming applications.
  • Networking Applications: Used to build network protocols, servers, and communication software.
  • GUI Applications: Used for developing graphical user interface applications and desktop software.
  • Scientific Applications: Used in scientific computing and simulation software requiring high performance.
  • Cybersecurity Tools: Used in security tools, penetration testing software, and network analyzers.

Related Article

Comment