Skip to the content.

C programming:-


History of C programming language:


History of C is very interesting to know:

Below is the table of some of the programming language developed before C

Languages Year Developed By
Algol 1960 International Group
BCPL 1967 Martin Richard
B 1970 Ken Thompson
Traditional C 1972 Dennis Ritchie
K & R C 1978 Kernighan & Dennis Ritchie
ANSI C 1989 ANSI Committee
ANSI/ISO C 1990 ISO Committee
C99 1999 Standardization Committee

Features of C programming :


**There are 10 important features of C programming languages**

  1. Simple

  2. Portable(Machine independent)

  3. Mid-level programming lanugage

  4. Structured programming lanugage

  5. Rich library

  6. Memory Management

  7. Fast Speed

  8. Pointers

  9. Recursion

  10. Extensible


1. Simple —————– C language is simple as it has easy to learn syntax, C programs can be structured(Can breaks into parts{function}),limited keywords.

2. Machine independent ————————— Unlike Assembly language, C program can be run in different machines. with some specific changes in code, C program can be run in 32-bit and 64-bit or ARM-based machine.

3. Midlevel programming language ————————————- Although C language has many low-level programming features like Dynamic-memory-managment{Allocates memory in runtime(You’ll be studying this in more detail later.)}, It supports feauters of high-level programming like arrays,structures,unions,etc

4. Structured programming language —————————————- C is a structured programming language in the sense that we can break the program into parts using functions. So, it is easy to understand and modify. Functions also provide code reusability.

5. Rich library ——————— C language provides rich in-built functions that makes programming fast and effective.

6. Memory Management ————————– It supports the feature of dynamic memory allocation. In C language, we can free the allocated memory at any time by calling the free() function.

7. Fast speed ——————- The compilation and execution time of C language is fast since there are lesser inbuilt functions and hence the lesser overhead.

8. Pointers —————————–

C provides the feature of pointers. We can directly interact with the memory by using the pointers. We can use pointers for memory, structures, functions, array, etc.

9. Recursion ———————————- In C, we can call the function within the function. It provides code reusability for every function. Recursion enables us to use the approach of backtracking.

10. Extensible —————————— C programs are extensible because we can implement new features in it.


Basic C program

    #include<stdio.h> //Header file
    /*Program starts with main()*/
    int main(){
        printf("Hello world"); //Prints value given in ()
    }

Explanation of the above program

How to compile and run c programs?

  1. Using an IDE
  2. Using Commandline(Windows)/Terminal(linux or macos)

Using an IDE: You can either install an IDE which you can edit your C programs and run programs easily.

Below given some of the most used ide for C programming

Using Commandline(Windows)/Terminal(linux or macos)

           gcc file_name.c -o file_name_to_be_saved

example: you wrote a program and saved as file name “hello.c” and you want to execute the file. you can compile “hello.c” to any name you want. here we will make output file name as “greet”

          gcc hello.c -0 greet