Contact Learn C
Copy

C Programs arranged under Categories


Basics
Hello World
To print from 1 to 100 numbers
To print Alphabets from A-Z
Print Alphabets from a-z(small)
To print whether given number is Odd or Even
To print all the odd number till ‘N’
To swap two numbers using 3rd variable
Swapping two values without using 3rd variable
To find if the given year is leap year or not
To convert given days to years,week and days
Biggest of three numbers
To Print GCD and LCM
Program to print Company Bonus on Salary
Calculate Gross Salary from given Basic Pay
Numbers
Sum of N numbers
Sum of all digits in a number
To print the reverse of a given number
To find whether given number is palindrome or not
Sum of all integers divisible by 2 between two numbers
To find factorial of a number
To print Fibonacci Series
To know whether given number is Prime or Not
To Print all prime number within the given number
To print whether the number is armstrong number or not
To know all the armstrong numbers between 1 and given number
To know whether the given number is perfect number or not
To Print all Perfect number between 1 and given number
Program to print Multiplication by using Addition
Program to check whether there are repeated digits in given Number
Find whether given number is Strong or Not
Find N Strong Numbers
Mathematics
To Print Areas of Triangle,Square,Circle,Rectangle,Parallelogram
To Print value of Sine Mathematically and using Library Function
To Print value of Cosine Mathematically and using Library Function
To find Quadrant of given Co-Ordinates
To find roots of quadratic equation
Calculator
Calculate Simple Interest in all Ways
Calculate only Simple Interest
To Calculate Compound Interest
Calculate Polynomial Equation
To Calcualte Permutation value nPr
To Calcualte Combination value nCr
Multiplicative Inverse of a Number
Program to print whether given Number is Happy or not
Program to print all Happy Numbers till N
Program to check whether the given number is power of an integer or not
Program to Display Mean,Variance and Standard Deviation
Program to Display X and Y values of Simultaneous Equations
Average of best two test marks out of given number of test marks
Display the output of a2+√ab+b2
Add N Polynomials
Multiply 2 Polynomials
Adding 2 Polynomials
Find Angles of Triangle for given lengths of sides
Sum Series
Sum of Series 1+1/2+1/3+1/4....+1/N
Sum of Series 1/1!+2/2!+3/3!+4/4!....+1/N!
To find sum of series in A.P for given first and last terms
To find Sum of GP Series
Sum of Series 1^2+2^2+3^2+......n^2
Sum of Series 1^2-2^2+3^2-......+n^2
Display Series in AP along with Sum for given Common difference and Number of Terms
Sum Series of 1^1/1!+2^2/2!+3^3/3!.. upto n terms
Sum Series (1+(1+2)+(1+2+3)+(1+2+3+4)+......till N)
Sum Series (1+(1*2)+(1*2*3)+....till N
Generate Series -1,4,-7,10,-13....till N
Bitwise Operators
Display AND table in C
All Bitwise Operations
Addition and Multiplication by 2 using Bitwise Operations
Odd or Even number using Bitwise Operations
Check whether all bits of a number are 1
Recursions
Print Sum of Even Numbers in Array using Recursion
Binary Search using Recursion
Bubble Sort using Recursion
Check if Repeated digits are there using Recursion
Find minimum number in given Array using Recursion
Factorial of a number using Recursion
GCD of a number using Recursion
Strings
To know whether the character is vowel or not
To Count number of vowels in a string
To know the length of a string without using string functions
To count number of words in a sentence
To count vowels in sentence
To count number of times a letter repeated in sentence
To know the frequency of each character in senetence
To convert upper to lower and vice versa
To Print number of white spaces in sentence
To know whether the given string is Palindrome or not
To print the reverse of given string
To concatenate two strings
To count vowels,consonants,digits and special characters
Search a substring in a given string
Compare two strings
To print sum of digits in string
To find the first capital letter in a given string
To find whether the given substring is present in string or not
To split sentence for a given character
To Sort names in Alphabetical order
Reverse of Words in given sentence in C
Program to print Largest and Smallest Word from given Sentence
Program to print Largest and Smallest Palindrome in Sentence
Program to print Circularly Permuted String for n number of times
Remove Repeated Words in String using C
Replace the Substring with the given String
Program to Limit number of Characters entered by User
Find Words with Consecutive Vowels in Sentence
Find Subsets of Given String
Find all Words Ended with given Character
Check whether all Characters from String 1 matches String 2(Not String Comparision)
Letters which are repeated more number of time
Find First Small Letter in String
Number of Characters need to make a String Palindrome
Check whether both Strings are Anagrams or not
Print ASCII value of given Character and Print its next character
Print ASCII Values of letters in string
Display Reverse of Number in words
Reverse of Given Number in words separate digits
Swap 2 String without String Library Functions
Strings using Library Functions
To print length of a string using string functions
Convert Upper to Lower and Vice Vesra using Library Functions
Print Reverse of given string using Library Functions
String Palindrome using library functions
String Comparision using Library functions
Display Occurrence of Word in the given String using Library Functions
Swap 2 strings
Conversions
Convert Decimal to Binary
Convert Binary to Decimal
Convert Roman to Decimal
Convert Decimal to Octal
Convert Octal to Decimal
Convert Celsius to Fahrenheit
Convert Fahrenheit to Celsius
Currency Length Speed Conversion
All in one Conversions(Total 12 Conversions in one Program)
Binary to Octal Conversion in C
Octal to Binary Conversion in C
Binary to Hexadecimal Conversion in C
Arrays
To find Average of Class
To find Sum of Negative and Positive integers
To find minimum and maximum of given numbers
To find first 2 maximum numbers in array
To separate even and odd numbers in an array
Delete a specified integer in array
Insert an element into an array at a specified position
To Remove repeated elements in an Array
To merge Two Arrays in sorted order
To print Union and Intersection of given Array
Program to display Array Pairs whose Sum is equal to a Number
Print the largest difference between two array elements in C
Print Average of Numbers in Array at Even Positions
Print Array elements in Reverse Order using Swapping method
Array Pair which when added will give nearest zero
Numbers repeated Odd number of times in array
Frequency of all numbers in array
Sort and Search
Sort array in Ascending order
Sort array in Descending order
Linear Search
Binary Search with input of any order
Binary Search with input as sorted order
Sort array using Bubble Sort
Insertion Sort
Selection Sort
Odd Even Sorting
Quick Sort in C
Arrange Rows and Columns of Matrix in Ascending order
Arrange Rows and Columns in Ascending order (Method II)
Arrange Rows and Columns of Matrix in Descending order
Arrange Rows in Ascending and Columns in Descending order
Program to print Frequency of digits in an Array
Program to print count of Armstrong and Palindromes in an Array
Matrices
Addition of 2 matrices
Difference of 2 matrices
Multiplication of 2 matrices
To Add 'N' Matrices
To get difference of 'N' Matrices
To Multiply 'N' Matrices
To compare 2 Matrices
To Transpose a given Matrix
To Find Trace of a given matrix
To find whether given Matrix is Identity or not
To find sum of rows and columns in a matrix
Program to print sum of Columns in matrix using GOTO Statement
To find Sum of all Diagonals in a matrix
To find whether given matrix is Sparse Matrix or not
To find Normal of Given matrix
Display Upper and Lower Triangle of given Matrix
To Print Sum of Upper and Lower Triangle of matrix
To Interchange of Diagonals in Matrix
Program to Check whether given Matrix is Orthogonal or not
Check Whether Both Matrices are Equal or not
Storage Classes
Automatic Storage Class
Register Storage Class
Voting System using Static storage Class
External Storage Class
Pointers
Printing Values in Variables using Pointers
Swap two numbers using Pointers
To Copy one string to other String using Pointers
To print length of a string using Pointers
To Concatenate two strings using Pointers
To Compare 2 strings using Pointers
To Print values in array by incementing Pointer
To Print values in array by Decrementing Pointer
Printing Character Array using Pointers
To print Sum of numbers in array usng Pointers
Program to print 'N' Characters from the given Position of a String using Pointers
Add 2 Matrices using Pointers in C
Subtract 2 Matrices using Pointers in C
Structures
Simple Structure
Simple Structure 2
Structure Pointer
Structure Array
Structure using Functions
Add N Complex Numbers using Structures
Total marks of all N Students for given subjects using Structures
Total marks of all N Students for M subjects using nested Structures
Data Structures
Single Linked List
Stacks using Arrays
Single Linked List Names
Files
Reading a File and Printing on console
Writing into file
To Append Text into a File
To print Sum of integers in File
To print number of Spaces,lines,characters and Tabs in a File
To Copy text from one File to Another File
Display File Size
Create a file with a set of numbers and write Odd and Even numbers into separate files
Numerical Patterns
To Print Floyds Triangle Pattern
Number Pyramid
Number Diamond Pattern
Number Diamond Pattern 2 for given pattern
Pascals Triangle
Right angle triangle pattern
Right angle Pattern 2
Right angle pattern 3
Numerical Pattern 1
Numerical Pattern 2
Reverse Right Angle Pattern 1
Reverse Right Angle Pattern 2
Reverse Right Angle Pattern3
Reverse Right Angle Pattern4
Program to print Numeric Pattern 4 for consecutive numbers
Numerical Pattern 6
Program to Display Number X Pattern
Program to Display Reverse Number X Pattern
Spiral Number Pattern in C
Generate Given Numerical Pattern 6_1
Print Numerical Hollow Parallelogram pattern
Alphabetical Patterns
Alphabetical Pattern1
Alphabetical Pattern 2
Alphabetical Pattern 3
Alphabetical Pattern 4
Reverse Alphabetical Pattern1
Reverse Alpha Pattern2
Reverse Alpha Pattern3
Reverse Alpha Pattern4
Program to print String in X Pattern
Program to print String in X Pattern(Reverse) in C
Print Any Alphabet as Symbol Pattern
Program to print Reverse V Alphabet Pattern
Spiral Alphabet Pattern in C
Display Alphabetical Pattern As Given--Alpha Pattern 6
Print Alphabetical Hollow Parallelogram pattern
Symbol Patterns
To Print Diamond for given number of rows
To print diamond for 3 rows
Symbol Pattern 1
Symbol Pattern 2
Symbol Pattern 3
Symbol Pattern 4
Symbol Pattern 5
Program to print Reverse V Symbol Pattern
Program to Display Symbol X Pattern
Symbol Hollow Parallelogram Pattern
Symbol Hollow Square Pattern
Symbol Steps Pattern
Left Reverse Symbol Steps Pattern
Right Symbol Steps Pattern
Miscellaneous Patterns
Numeric Pattern 1
Numeric Pattern2
Numeric Pattern 3
Numeric Pattern 4
Numerical Pattern 5 Reverse Number
Alpha Pattern 1
Alpha Pattern 2
Alpha Pattern3
Alpha Pattern 4
Alpha Pattern 5
Program to Display Alpha Numeric Pattern
Miscellaneous Numeric Pattern 5
Symbol Pyramids
Symbol Pyramid
Reverse Symbol Pyramid
Left Symbol Pyramid
Right Symbol Pyramid
Alpha Pyramids
Alpha Pyramid 1
Reverse Alpha Pyramid 1
Left Alpha Pyramid 1
Right Alpha Pyramid 1
Alpha Pyramid 2
Reverse Alpha Pyramid 2
Left Alpha Pyramid 2
Right Alpha Pyramid 2
Alpha Pyramid 3
Reverse Alpha Pyramid 3
Left Alpha Pyramid 3
Right Alpha Pyramid 3
Alpha Pyramid 4
Reverse Alpha Pyramid 4
Left Alpha Pyramid 4
Alpha pyramid 5
Reverse Alpha Pyramid 5
Alphabetical Sand Glass Pattern using C
Alphabetical SandGlass Pattern 2 using C
Alpha Pyramid 6
Number Pyramids
Number Pyramid 1
Reverse Number Pyramid 1
Left Number Pyramid 1
Right Number Pyramid 1
Number Pyramid 2
Reverse Number Pyramid 2
Left Number Pyramid 2
Right Number Pyramid 2
Number Pyramid 3
Reverse Number Pyramid 3
Left Number Pyramid 3
Program to print Reverse Binary Pyramid
Program to print Binary Pyramid
Sand Glass Pattern in C(Pyramid Combination)
Left Number Pyramid 4
Games
Number Guessing Game
TIC-TAC-TOE
Towers Of Hanoi
Guess the Toss of a Coin
Hand Cricket Game in C
Magic Square for Given number of rows
Check Whether Given Matrix is Magic Square or Not
Preprocessor
Area and Circumference of Circle using Macro Substituion
All Mathematical Operations using Macro Substitution
Applications
Multiplication Table
Rearrange Entered C Code
Chakravyuha or Spiral Pattern Program(Question Taken from Codevitae(TCS) 2017)
Tell me any Date ,I will tell you the Day
Program to Read a Date and print the number of days elapsed from 1st January of the given year
Voting System using Static storage Class in C
Wall Clock Program Method 1
Wall Clock Program Method 2
Program to run html file,to shutdown and to restart using C
Online Shopping Program using C
Medical Store Project in C
Print Any Alphabet as Symbol Pattern
Authenticating User based on 3 Attempts
Program for ATM Machine
Get Calendar for Given Year and Month
Lucky Winner using Files
Program to Limit number of Characters entered by User
Print Given Money or Value in Words
Program to prepare Agenda(Events on a particular day) and Store in file
Program to print Compound interest for Given Years with next 4 rates in table
Store Contacts in Text file using C
Password Generator in C
Calculate Electricity Bill
Print all possible squares from given N Co-ordinates
Pizza Hut Management System
Print Loaction of running Program
Printing program's own Source Code
Distance between 2 Points
Encryption/Cipher
Encrypt using Caesar Code
Encryption using Binary Code
Encryption using ASCII Code
Generate Morse Code
Encryption(Cipher) using Numeral Code
Atbash Cipher
Encryption using Latin Alphabet
Encryption using Polybius Cipher
Rail Fence Cipher
Scytale Cipher
One Time Pad Cipher
Viginere Cipher
Affine Cipher
Play Fair Cipher
Decryption
Decryption of Caesar Code
Decryption of Morse Code Cipher
Decryption of Rail Fence Cipher
Decryption of Binary Code Cipher
Decryption of Atbash Cipher
Decryption of Latin Alphabet Cipher
Decryption of Scytale Cipher
Decryption of One Time Pad Cipher
Decryption of Viginere Cipher
Decryption of ASCII Code Cipher
Decryption of Numeral Code Cipher
Decryption of Affine Cipher
Decryption of Polybius Square Cipher
Decryption of Playfair Cipher
Compiler Used by me C-Free 5.0(Recommended)
Other Compilers Code Blocks(Recommended)
Online Compilers Ideone(Remember to give input before executing online where ever necessary)
Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide