Skip to main content

C Programming Language

C is a general-purpose programming language. It was developed by Denish Ritchie and Ken Thompson at the Bell's laboratory in 1972 for writing the UNIX operating system. It is one of the oldest programming languages still popular around today.

C is widely used for writing system-level software like operating systems, databases, compilers, device drivers etc. When performance is a concern, C is among the most preferred languages. This is because C allows programmers to work closely with hardware.

C vs C++

C and C++ are closely related languages. C++ was originally created as an enhanced version of C language. They have near-identical syntax and great interoperability. Most programs written in C will work with C++ but C++ is not a strict superset of C. Newer versions of C has few syntaxes which are not supported in C++.

An Example of C Program

It has been a tradition in the programming community to write the first program that prints "Hello World" to the console. It was originally started by Denish Ritchie in his book

#include<stdio.h>

int main(){
printf("Hello World!\n");
}

Reasons for Learning C

Here are some of the reasons you would want to learn C:

  1. C is the one of the fastest highlevel language.
  2. C is fairly small language and most of its syntaxes can be learnt quickly.
  3. Many popular languages like C++, Java, JavaScript, PHP etc have syntax similar to C. So, learning syntax of C can be helpful for learning those languages.
  4. Most of system level softwares like OS, compilers, language runtimes, device drivers etc are mostly written in C. So, C is a most for system programming.
  5. Learning C can be helpful for understanding how hardwares run as C works closely with hardware.