C Programs

Here is a big collection of important C programs code with output. These C programs code will help you in learning different concepts like loops, functions, array, string, pointers, file handling, structure, sorting, searching etc.

 

c programs list

 

Basic

1. Hello World Program in C
2. Add Two Numbers in C
3. Find roots of quadratic equation in C
4. Convert Temperature Fahrenheit to Celsius in C
5. Find Surface Area of Sphere in C
6. Calculator program in C
7. Swap Two Numbers in C
8. Swap Two Numbers Without Using Third Variable
9. Random Number Generator in C
10. Generate 10 Random Number in Range
11. Volume of Sphere Calculator in C

 

if/else

1. Find Odd or Even Program in C
2. Leap Year Program in C
2. Find Largest of Three Numbers in C
3. C program to find whether a given character is an alphabet,digit or any special character

 

 

Loops

1. Factorial program in C
2. Floyd’s triangle in C
3. Perfect Square in C
4. Sum of n Natural Numbers in C
5. Fibonacci Series Program in C
6. Palindrome Number Program in C
7. Armstrong Number in C
8. Print n Prime Numbers in C
9. Sum of Digits of a Number in C
10. Reverse a Number in C
11. Check Prime number in C
12. Pascal Triangle in C
13. Perfect Number in C

 

 

Switch Case

1. Calculator Program in C using Switch Case
2. Print Name of Day using Switch Case in C

 

 

Array

1. 1d Array Program in C
2. Sort Array in Ascending Order
3. Find Largest Number in Array
4. Find Second Largest Number in Array
5. Find Sum and Average of Array Elements
6. Search an Element in an Array
7. Insert an Element in an Array
8. Delete an Element from an Array
9. Remove Duplicate Elements from Array
10. 2d Array Program in C
11. Addition Of Two Matrix in C
12. Subtraction of Two Matrix in C
13. Matrix Multiplication in C
14. Transpose a Matrix in C
15. Inverse Matrix of 3×3 in C

 

 

String

1. getchar and putchar in C
2. String Length in C
3. String Palindrome Program in C
4. Reverse String in C
5. String Compare in C

 

 

Pointer

1. Swap 2 Numbers using Pointers
2. Swap two numbers using Call by Reference in C
3. Remove Vowels from String
4. Remove Spaces, Blanks From String
5. dangling pointer in c
6. null pointer in c
7. void pointer in c
8. Pointer to Pointer in C
9. Function Pointer in C

 

 

File Handling

1. Create a file using file handling in C
2. File handling in C Programming Simple Example
3. C program to Create a File and Display its Contents
4. Copy contents of one file to another
5. Employee Record System using File Handling
6. Payroll Data Entry using file handling in C

 

 

Structure

1. Student Structure Program in C
2. Structure and Union in C program

 

 

Functions

1. Sum of two numbers in C using Function
2. Swap two Numbers using Call by Value
3. Strong Number in C using Function
4. Change string from upper case to lower case in C

 

 

Searching/Sorting

1. Linear Search in C
2. Binary Search in C
3. Insertion Sort in C
4. Selection Sort in C
5. Bubble Sort in C
6. Merge Sort in C
7. Heap Sort in C
8. Quick Sort in C
9. Counting Sort in C
10. Bucket Sort in C
11. Radix Sort in C

 

 

Tricky C Programs

1. Add two Numbers without using Addition operator in C
2. Print ‘Hello World’ without semicolon in C
3. Check Odd or Even without using Modulus Operator in C
4. How to Print Double Quotes in C
5. How to run c program without main function

 

 

Star Pattern Programs

Square Star Pattern

Square Star Pattern

Pyramid Star Pattern

Pyramid Star Pattern

Inverted Pyramid Star Pattern

Inverted Pyramid Star

Diamond Star Pattern

Diamond Star Pattern

right triangle pattern

Right Triangle Star Pattern

inverted right triangle

Inverted Right Triangle Star Pattern

Half Diamond Pattern

Half Diamond Star Pattern

Mirrored Right Triangle Star Pattern

Mirrored Right Triangle Star Pattern

Inverted Mirrored Right Triangle star Pattern

Mirrored Inverted Right Triangle Star Pattern

Left Half Diamond Pattern

Left Half Diamond  Star Pattern

hollow square star pattern

Hollow Square Star Pattern

hollow pyramid star pattern

Hollow Pyramid Star Pattern

 

 

More C programs will be added soon……

 

 

 

Scroll to Top