Here you will find the list of C programs that will help you to learn C programming. These programs include the basic concept of C like functions, loops, structures, variables, pointers, etc.

  1. Reverse a String
  2. Palindrome string
  3. String Array
  4. Sort String array in Alphabetical Order
  5. Remove Duplicate Characters in a String


  1. Palindrome Number
  2. Armstrong Number
  3. Neon Number
  4. Magic Number
  5. Perfect Number
  6. Strong Number
  7. Automorphic Number
  8. Fascinating Number
  9. Harshad Number
  10. Swap 2 Numbers without using 3rd Variable


  1. Check Leap Year
  2. Factorial of a Number
  3. Prime Numbers From 1 to N

Number Conversion

  1. Decimal to Binary
  2. Binary to Decimal
  3. Decimal to Octal
  4. Octal to Decimal


  1. Reverse Array without Using another Array
  2. Delete Duplicate Elements in an Array
  3. Find Second Largest in an Array


  1. Matrix addition in C
  2. Matrix addition using the linked list
  3. Matrix multiplication in C
  4. Transpose of Matrix
  5. Check for Identity Matrix
  6. Minimum in Row and Maximum in Column
  7. Search Element in 2D array


  1. Tower of Hanoi using Recursion
  2. Fibonacci Series in C


  1. Read and Print Employee Details using Structure
  2. Read and Print Student Details using Structure


  1. Patterns Programs in C

Command Line Arguments

  1. Binary to Decimal using Command Line Argument

The best way to learn to program is by practicing on your own. So we recommend you to code on your own after reading our programming examples.

To Practise C programming you will need a text editor and a c/c++ compiler. If you don’t have that, you can download the Dev-C++ IDE to run your c or c++ source code on your machine.

You can also code C language online using online platform like which is absolutely free.

Unlike C++, Java, and Python – C is not object-oriented programming language so for a newbie it is the best language to learn because knowing the logic how the code works and run? is more important than learning cool complex features of OOP.

So let’s start with Hello World Program in C.

Output: Hello World

If you are not familiar with the basic concepts of c language then don’t worry. Let’s Learn C together.

Basics of C Language

The fundamental smallest units of C program are known as Tokens. For example, if you break down c programs into smaller parts, the smallest to have some meaning or significance is considered as a Token.

Example: if, for, int, main, return, ;, +, -, class, #, myVariable, etc.

The main types of Tokens in C are:

  1. Keywords: These are the words that are reserved for special purpose in C language e.g default. switch, if, class, char, int, etc.
  2. Operators: These types of tokens in C are basically use to perform mathematical or logical operations e.g +, -, ||, & etc.
  3. Identifiers: These are the names given to program elements such as array, variable, function to identify them for use e.g student_id, add, roll_no etc.
  4. Constants: These are the types of tokens whose values remains fixed through out the program. It can be of two types:
    1. Numeric Constant: such as const int num = 2.
    2. Character constant: such as ‘\n’, ‘\b’.

Variables in C

A variable is named storage which can hold single or more values.


The above program output 9. x and y are variables that are used to store 4 and 5 respectively.

Now variables in C can be of two types:

  1. Local Variable
  2. Global Variable

A local variable is that variable whose value is confined to a particular scope or function and a global variable can be accessed or modified throughout the program.