BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

Ultimate Collection of C Programs: Source Code with Outputs

Last Updated: December 1, 2024 by Chaitanya Singh | Filed Under: C Programs

Here we are sharing C programs on various topics of C Programming such as array, strings, series, area & volume of geometrical figures, mathematical calculation, sorting & searching algorithms and many more. Our aim is to provide you the perfect solution of all the C programming questions that you may have either faced during interviews or in class assignments. If you don’t find what you are looking for then please drop a line in the comment section below so that we can get it added to the below collection of C programs. Happy Learning!!

Simple C Programs

  • Hello World Program in C
  • C program to check whether the given number is positive or negative
  • Reverse an input number using recursion
  • Program to find greatest of three numbers
  • C Program to print Fibonacci series in a given range
  • C Program to find factorial of a given number
  • Find Prime numbers in a given range
  • C Program to check if given number is Armstrong or not
  • C Program to check if given number is palindrome or not
  • C program to display palindrome numbers in a given range
  • C Program to find out the ASCII value of a character
  • C Program to find the size of int, float, double and char
  • C Program to find sum of first n natural numbers
  • C program to print integer entered by user

Decision making and loop C Programs for practice

  • C Program to check if number is odd or even
  • C Program to check whether an alphabet is vowel or consonant
  • C Program to check leap year
  • C Program to generate multiplication table
  • C Program to display characters from ‘A’ to ‘Z’ using loop

Number Programs

C Programs related to numbers with solutions.

  • C Program to Add two integers
  • C Program to find GCD of two numbers
  • C Program to find LCM of two numbers
  • C Program to check whether number is prime or not
  • C Program to count number of digits in an integer
  • C Program to calculate the power of a number
  • C Program to print prime numbers from 1 to 100 (1 to N)
  • C Program to display Armstrong numbers between two intervals.
  • C Program to check if a number is divisible by 3 and 5
  • C Program to print numbers divisible by 3 and 5 from 1 to 100
  • C Program to check abundant number
  • C Program to find sum of digits of a number
  • C Program to display factors of a number
  • C Program to swap first and last digits of a number
  • C Program to print cube of a number upto an integer

String Programs

  • Program to convert string from upper case to lower case
  • Program to convert string from lower case to upper case
  • Sort a set of strings in ascending alphabetical order
  • Find length of a string without using strlen()
  • String concatenation without using strcat
  • Reverse a String using recursion
  • C Program to find frequency of characters in a string
  • C Program to search substring in a given string
  • C Program to replace first occurrence of vowel with ‘-‘ in a string

Array Programs

  • Program to sort array in ascending order
  • Find largest element of given array
  • C program to find sum of array elements
  • C Program to find number of elements in an array
  • C Program to calculate average using array
  • Tic Tac Toe in C Programming using 2D Array
  • C Program to swap first and last elements of an array

C Programs on Date and Time

  • C Program to print current date and time
  • C Program to print day for the input date month year
  • C Program to convert 24 hour format to 12 hour format
  • C Program to convert 12 hour format to 24 hour format
  • C Program to print number of days in a month
  • C Program to validate a given date

Sorting programs

  • Bubble sort program in C
  • Insertion sort program in C
  • Selection sort program in C
  • Quicksort program in C

C Pointer programs

  • C program to find the largest of three numbers using Pointers
  • C program to count vowels and consonants in a String using pointer
  • C program to print String using Pointer
  • C program to swap two numbers using pointers
  • C program to create initialize and access a pointer variable
  • C Program to access array elements using pointer

Programs on calculation

  • Find the value of nPr for given value of n & r
  • Find the value of nCr for given value of n & r
  • C Program to multiply two floating numbers
  • C Program to find out Quotient and Remainder
  • C Program to find average of two numbers

Number system conversion programs

  • Binary to decimal conversion
  • C Program to convert Decimal to Binary
  • C Program to convert Decimal to Octal
  • C Program to convert Octal to Decimal
  • C Program to convert Binary to Octal
  • C Program to convert Octal to Binary

Programs to find out areas of Geometric figures

  • C program to find area and circumference of circle
  • C program to find area of equilateral triangle
  • C Program to calculate area of triangle using Heron’s formula
  • C Program to calculate area of rectangle

File handling Programs

  • C Program to read the first line from a file
  • C Program to write a sentence to a file

C Programs on patterns

  • C Program to print right triangle star pattern
  • C Program to print left triangle star pattern
  • C Program to pyramid star pattern

C Programs on structures

  • C Program to store information of students using structure
  • C Program to read and print employee details using structure
  • C Program to calculate employee salary using structure
  • C Program to add two distances using structure
  • C Program to multiply two complex numbers using structure
  • C Program to print date of birth using structure

C Tutorial

If you are comfortable with the above programs and able to understand & run them successfully without any issues then its time for you to take a step further and learn C programming concepts in detail with the help of examples and flow diagrams. Here is the link: C Programming tutorial.

C programming Books

If you want to master programming in C language then these are the best books for you. Refer them and practice the programs that I have shared above.

  • C Programming: A Modern Approach by K.N. King
  • The C Programming Language by Brian W. Kernighan, Dennis M. Ritchie
  • Let Us C by Yashavant Kanetkar

Top Related Articles:

  1. C Program to find the Average of two numbers
  2. C Program to Convert Binary to Octal Number System
  3. C Program to Convert Octal Number to Decimal Number
  4. C Program to print date of birth using structure
  5. C Program to Convert Decimal to Octal Number

About the Author

I have 15 years of experience in the IT industry, working with renowned multinational corporations. Additionally, I have dedicated over a decade to teaching, allowing me to refine my skills in delivering information in a simple and easily understandable manner.

– Chaitanya

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2012 – 2025 BeginnersBook . Privacy Policy . Sitemap