C-Program
Introduction to C programming language
Last Updated on: 3rd Jul 2025 01:33:14 AM
What is C Programming?
C is a general-purpose, high-level programming language developed to write system software and applications. It is known for its speed, simplicity, and flexibility, making it one of the most widely used programming languages even today.
C is often called the mother of all programming languages because many modern languages like C++, Java, and Python have roots in C.
It allows programmers to write efficient code that closely interacts with hardware, which is why it's commonly used in operating systems, embedded systems, and compilers.
History and features of c language :
-
Developed by Dennis Ritchie in 1972 at Bell Laboratories.
-
It was designed to develop the UNIX operating system, which was originally written in assembly language.
-
C soon became popular for its portability, performance, and power.
-
Simple and easy to learn syntax.
-
Fast execution and highly efficient.
-
Structured language – allows breaking programs into functions.
-
Portability – C programs can run on different machines with little or no modification.
-
Rich library of built-in functions.
-
Low-level access to memory using pointers.
-
Modular approach – helps in code reusability and maintenance.
-
Builds strong programming fundamentals – concepts like loops, functions, arrays, and memory management are foundational.
-
Fast and efficient – great for performance-critical applications.
-
Used in system programming – like operating systems, device drivers, etc.
-
Helps understand how software interacts with hardware.
-
Foundation for learning other languages – like C++, Java, and Python.
-
Demand in industries like embedded systems, robotics, and game development.
#include <stdio.h> // Preprocessor directive
int main() { // Main function – entry point
printf("Hello, World!"); // Output function
return 0; // Return statement
}
Explanation:
-
#include <stdio.h>
– Includes the Standard Input Output library. -
int main()
– Main function where the execution starts. -
printf("Hello, World!")
– Displays output to the screen. -
return 0;
– Ends the function and returns zero to the OS.