C
C Programs | C Programming Example with Outputs
156 lessons
10 sections
C Basics Programs
- 1 C Program to Print Hello World
- 2 C Program to check whether a Date is Valid or not
- 3 C Program to calculate Simple Interest
- 4 C Program to Find the Size of int, float, double and char
- 5 C Program to find Cosine value
- 6 C Program to Print ASCII Value of a Character
- 7 C Program to check whether a year is a Leap year or not
- 8 C Program to Convert Fahrenheit to Celsius
- 9 C Program to Calculate the Area and Circumference of a Circle
- 10 C Program to Find the Area of a Rectangle
- 11 C Program to Find the Largest of three Numbers
- 12 C Program to Multiply two numbers using Addition operator
- 13 C Program to check whether a Number is Binary or Not
- 14 Menu Driven Program using Switch Case in C
- 15 Currency Conversion Program in C
C Numbers Programs
- 1 C Program to Check Whether Number is Even or Odd (Condition and Ternary Operator)
- 2 Magic Number in C
- 3 C Program to Swap Two Numbers without using Third Variable
- 4 C Program to Swap Two Numbers
- 5 C Program to Add Two Numbers using Pointers
- 6 C Program to Find Roots of a Quadratic Equation
- 7 C Program to Check Whether a Given Number is Prime or Not
- 8 C program to Print Prime Numbers in a Given Range (max & min)
- 9 C Program to Print Prime Numbers up to a Given Number
- 10 Factorial Program in C using Function
- 11 C Program to Find Factorial of a Number using Recursion
- 12 C Program to Find Quadrant of a given Co-Ordinate
- 13 C Program to Count the Number of Digits in an Integer
- 14 C Program to Reverse a Number using Loops
- 15 C Program to Reverse a given Number using Recursive Function
- 16 C Program to Print Natural Numbers in Reverse from n to 1
- 17 C Program to Print Natural Numbers in Reverse order with a difference of 2
- 18 Sum of digits of a Number in C
- 19 C Program to Check Whether a Number is Palindrome or Not
- 20 C Program to Generate Fibonacci Series
- 21 C Program to Find Sum of First and Last Digit of any Number
- 22 C Program to Find the GCD and LCM of Two Integers
- 23 C Program to Find LCM of two Numbers
- 24 C Program to Find GCD of two Numbers
- 25 C Program to Convert Number to Words
- 26 C Program to Generate Random Numbers
- 27 C Program to Generate Random numbers within a Range
- 28 C Program to Reverse a Number using for loop
- 29 C Program to Print Multiplication Table
C Special Number Programs
- 1 C Program to Print all Magic Number till N
- 2 C Program to Check Armstrong Number
- 3 C Program for Pascal Triangle
- 4 C Program for Strong Number
- 5 C Program to Check the Number is a Neon Number or Not
- 6 Fizz Buzz Program in C
- 7 Automorphic Number Program in C
- 8 Happy Number Program in C
- 9 Sunny Number Program in C
- 10 Peterson Number in C
- 11 Fascinating Number Program in C
- 12 Keith Number Program in C
Searching and Sorting Algorithm in C
- 1 Binary Search in C
- 2 Binary Search Tree Program in C
- 3 C Program to Implement Bubble Sort
- 4 C Program for implementation of Selection sort
- 5 Implement Insertion sort Program in C
- 6 Implementation of HeapSort Algorithm in C
- 7 Implementation of Quick SortAlgorithm in C
- 8 C Program to Implement Merge Sort
- 9 Implementation of Shell Sort Algorithm in C
C Conversion Programs
- 1 C Program to Convert Binary to Decimal
- 2 C Program to Convert Decimal to Binary
- 3 C Program to Convert Octal to Binary
- 4 C Program to Convert Binary to Octal
- 5 C Program to Convert Decimal to Octal using Recursion and Loop
- 6 C Program to Convert Octal to Decimal
- 7 C Program to Convert Decimal to Hexadecimal
- 8 C Program to convert Hexadecimal to Decimal
- 9 C Program to Convert Binary to Hexadecimal
- 10 C Program to Convert Hexadecimal to Binary
- 11 C Program to Convert Octal to Hexadecimal
- 12 C Program to Convert Hexadecimal to Octal
C Array Programs
- 1 C Program for Matrix Addition
- 2 C Program to Multiply Two Matrices
- 3 C Program to Search an Element in an Array
- 4 C Program to find the sum of all elements in an Array
- 5 C Program to Access an element in 2-D Array
- 6 C Program to find the Largest and Smallest element in Array
- 7 C Program to Find Second Largest Number in an Array
- 8 Program to Reverse the Array Elements in C
- 9 C Program for deletion of an element from the specified location from Array
- 10 C Program to Delete a Particular element from an Array
- 11 C Program to Find Sum of Diagonal elements in a Matrix
- 12 C Program to Find Inverse of a Matrix
- 13 C Program to Find Transpose of a Matrix
C Strings Programs
- 1 C String – strlen() function
- 2 C String – strcpy() function
- 3 C String – strcat() function
- 4 C String – strcmp() function
- 5 C String – strrev() function
- 6 C String – strlwr() function
- 7 C String – strupr() function
- 8 C String – strchr() function
- 9 C Program to Reverse a String
- 10 C Program to Check whether the entered character is capital, small letter, digit or special character
- 11 C Program to Convert Uppercase to Lowercase and Vice Versa in a string
- 12 C Program to check for String Palindrome without using string functions
- 13 C Program to Check if a Given String is a Palindrome
- 14 C Program to Compare two Strings using strcmp()
- 15 C Program to Find Length of a String Using strlen() Function
- 16 C Program to Find the Length of a String without using Function strlen()
- 17 C Program to Find the Frequency of Characters in a String
- 18 C Program to sort a String in Ascending order
C Files Programs
- 1 C Program to create a File & write Data in it
- 2 C Program to Copy Contents of one file to another
- 3 C Program to Append Data to a Text file
- 4 C Program to Merge Two Files
- 5 C Program to Read the First Line From a File
- 6 C Program to Count the Number of Lines in a File
- 7 C Program to Count the Number of Characters Words and Lines in a file
C Pattern Programs
- 1 C Program to Print Pascal Triangle
- 2 C Program to print Floyd’s Triangle
- 3 C Program to print Odd Number Pattern
- 4 Diagonal Number Pattern in C
- 5 Hourglass number Pattern in C
- 6 Full Pyramid Number Pattern in C
- 7 Half Pyramid Number Pattern in C
- 8 Left Half Pyramids in C using Numbers
- 9 Half Hourglass Number pattern in C
- 10 Half Diamond number pattern in C
- 11 Half Pyramid Star Pattern in C
- 12 Diamond Shape Star Pattern in C
- 13 Half Diamond Star Pattern in C
- 14 Hourglass Star Pattern in C
- 15 C Program to print Half Hourglass Star pattern
- 16 Hollow Triangle Star Pattern in C
- 17 Square Star pattern in C
- 18 Rectangle Star Pattern in C
- 19 Full Pyramid Pattern Program in C using Stars
- 20 Diagonal Star Pattern in C
- 21 Inverted hollow Triangle Star pattern in C
- 22 C Program to Print Pyramid Pattern of Alphabets
- 23 Half Hourglass Alphabet Pattern in C
- 24 Full hourglass pattern of Alphabets in C
- 25 Square Pattern of any Character in C
- 26 Inverted Half Pyramid Pattern of Alphabets in C
- 27 Half Pyramid of Alphabets in C
- 28 Half Diamond Pattern in C using Alphabets
- 29 Program to Print Diamond Alphabet Patterns in C
- 30 String Pattern Programs in C
- 31 Algorithm and Flowchart to find Factorial of a number
- 32 Algorithm and Flowchart to find Fibonacci series
Important Algorithms in C
- 1 Dining Philosophers problem in C
- 2 Round Robin Scheduling in C
- 3 Bit Stuffing Program in C
- 4 Kruskal’s Algorithm in C
- 5 C Program for Predictive Parser
- 6 LRU Page Replacement Algorithm in C
- 7 Implementation of Stack Using Array in C Program
- 8 C Program for Simultaneous Equations
- 9 Infix to Postfix Conversion in C Program using Stack