Sunday 18 February 2018

100 C Programs with Code and Output


Program 1: C Program To Read Two Numbers And Print The Sum Of Given Two Numbers.
Program 2: C Program To Read Three Numbers And Print The Biggest Of Given Three Numbers.
Program 3: C Program to print Individual Digits.
Program 4: C Program To Read A Number And Find Whether The Given Number Is Even Or Odd.
Program 5: C Program to print ODD numbers from 1 to N
Program 6: C Program to print natural numbers from 1 to 10 in Reverse
Program 7: C Program to accept a number and check the given number is Armstrong or not.
Program 8: C Program to accept a number and print mathematical table of the given no.
Program 9: C Program to accept a year and check whether the given year IS leap year or not.
Program 10: C Program to print Fibonacci series .
Program 11:C Program to print numeric pyramid-I
Program 12:C Program to print numeric pyramid-II
Program 13: C program to print following pattern 1 01 101 0101
Program 14:C program to print following pattern 1 22 333 4444
Program 15: C Program to print prime numbers between 1 to 100
Program 16: C Program to accept a number and find factorial of given number
Program 17: C Program to accept a number and print in Reverse order.
Program 18: Implement the following procedure to generate prime numbers from 1 to 100 into a program. This procedure is called sieve of Eratosthenes.
    step 1     Fill an array num[100] with numbers from 1 to 100
    step 2     Starting with the second entry in the array, set all its multiples to zero.
    step 3     Proceed to the next non-zero element and set all its multiples to zero.
    step 4     Repeat step 3 till you have set up the multiples of all the non-zero elements to zero
    step 5     At the conclusion of step 4, all the non-zero entries left in the array would be prime numbers, so print out these numbers.

Program 19: C Program to Count Occurrence of Positive, Zero and Negative Numbers .
Program 20: C Program to Check Alphabet or Not
Program 21: C Program to Check Vowel or Not
Program 22: C Program Addition, Subtraction, Multiplication, and Division
Program 23: C Program to Make Simple Calculator
Program 24: C Program to Calculate Average and Percentage Marks
Program 25: C Program to Swap Two Numbers
Program 26: C Program to Calculate Grade of Student.
Program 27:C Program to Find HCF and LCM of Two Numbers.
Program 28: C Program to Calculate Area and Perimeter of Square and Rectangle.
Program 29: C Program to Calculate Arithmetic Mean
Program 30: C Program Fahrenheit to Centigrade Conversion and vice versa
Program 31: C Program Print ASCII Values of Characters
Program 32: C Program Decimal to Binary Conversion
Program 33: C Program Decimal to Octal Conversion
Program 34: C Program Decimal to Hexadecimal Conversion
Program 35: C Program to Convert Binary to Decimal
Program 36: C Program Binary to Octal
Program 37: C Program Binary to Hexadecimal
Program 38: C Program to Convert Octal to Decimal
Program 39: C Program to Convert Octal to Binary
Program 40: C Program to Print Diamond Pattern of Stars
Program 41: C Program to Print Floyd Triangle
Program 42:C Program to Print Pascal Triangle
Program 43: C Program to print pyramid using numbers
Program 44: C Program to print pyramid using *
Program 45: C Program to print Inverted full pyramid using *
Program 46: C Program - One Dimensional Array
Program 47: C program to sum n numbers using an array.
Program 48: C Program to Find Largest Element in Array
Program 49: C Program to Find Smallest Element in Array
Program 50: C Program to Find the Second Largest & Smallest Elements in an Array
Program 51: C Program Linear Search
Program 52: C Program Binary Search
Program 53: C Program to Reverse Array
Program 54: C Program to Insert Element in an Array
Program 54:C Program to Delete Element from an Array
Program 56: C Program to Merge Two Arrays
Program 57: C Program Bubble Sort
Program 58: C Program Selection Sort
Program 59:C Program Insertion Sort
Program 60: C Program Two Dimensional Array
Program 61:C Program to Add Two Matrices
Program 62:C Program to Subtract Two Matrices
Program 63:C Program to Transpose Matrix
Program 64: C Program to Multiply Two Matrices
Program 65:C program to demonstrate the use of pointers
Program 66: C Program to perform all arithmetic operations using pointers
Program 67:C program to swap two numbers using call by reference
Program 68:C Program to input and print array elements using pointer
Program 69:C program to copy one array to another using pointers
Program 70:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 71:C Program Code to Print String.
Program 72: C Program to Find Length of String .
Program 73:C Program to Compare Two Strings.
Program 74:C Program to Copy String.
Program 75:C Program to Copy String Without Using strcpy().
Program 76:C Program to Concatenate String
Program 77:C program to Concatenate Two Strings without using strcat() .
Program 78:C Program to Reverse String.
Program 79:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 80:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 81:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 82:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 83:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 84:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 85:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 86:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 87:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 88:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 89:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 90:C program to read and print student details using structure pointer, demonstrate example of structure with pointer. Program 91:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 92:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 93:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 94:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 95:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 96:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 97:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 98:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 99:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.
Program 100:C program to read and print student details using structure pointer, demonstrate example of structure with pointer.

100 C Programs with Code and Output

Program 1: C Program To Read Two Numbers And Print The Sum Of Given Two Numbers. Program 2: C Program To Read Three Numbers And Prin...