List of C Programs
List of C Programs
Submission
C Programming
No Date
I Simple programs
1 Prime number and factorial
Write a C program to get an input ‘n’ from the user and compute the following series,
a) 1 ⋯ if n is an even number
! ! !
b) 𝑥 ⋯ if n is an odd number
! ! !
II Arrays
3 Matrix Calculation
Write a C program to get input of two 2x2 matrices from the user and perform the following
operations.
a) Add the two matrices
b) Subtract the first matrix from the second matrix
c) Element wise multiplication
4 Array Manipulation
Write a C program to get ‘n’ numbers as input from the user and,
a) Find the maximum and minimum number.
b) Sort them in ascending and descending order.
5 Basic Statistics
Write a C program to get ‘n’ numbers as input from the user and find,
a) Mean
b) Median
c) Mode
III Strings
6 Palindrome
Write a C program to get a string input from the user and check if the string is palindrome or
not.
7 Vowel-Consonant Count
Write a C program to get a string input from the user and count the number of vowels and
consonants in the string.
8 String manipulation
Write a C program to get a two-string input from the user and insert the second string within
the first string at a given position.
IV Functions
Write a C program to read a list of numbers and search for given number using binary search
algorithm and if found display its index otherwise display the message "element not found in
the list" using functions.
V Pointers
11 Number Swapping
Use Structures and Unions to develop a program for Library management system: 1) book title,
2) author of book, and 3) year of publication for a college library from the librarian. The
collected information has to be displayed when demanded.
VII SkillRack