Shri G. S.
Institute of Technology & Science
C Programming -Lab Assignment 4
INDEX
S. No. Programs Page no. Remarks
1. Write a program to store n no. of elements in an array & print them. 1
2. Write a program in C to find the maximum & minimum elements in an 1-2
array.
3. Write a program in C to sort elements of array in ascending order. 2-3
4. Write a program in C to sort elements of array in descending order. 3-4
5. Write a program in C to read n number of values in an array and display 4
them in reverse order.
6. Write a program in C to insert values in an array (sorted list). 4-5
7. Write a program in C to insert values in an array (unsorted list). 5-6
8. Write a program in C to find sum of all elements of an array. 6-7
9. Write a program in C to copy elements of one array into another array. 7
10. Write a program in C to merge two arrays of the same size sorted in 7-8
descending order.
11. Write a program in C to count total no. of duplicate elements in array. 9
12. Write a program in C to delete an element in desired position from an 9-10
array.
13. Write a program in C to find second largest element in an array. 10-11
14. Write a program in C to find the second smallest element in an array. 11-12
15. Write a program in C for a 2D array of size 2*2 and print the matrix. 12-13
16. Write a program in C for adding two matrices of the same size. 13-14
17. Write a program in C for subtraction of two matrices. 14-15
18. Write a program in C for multiplication of two square matrices. 15-16
19. Write a program in C to find transpose of a given matrix. 17
20. Write a program in C to find the sum of the right diagonals of a matrix. 18
21. Write a program in C find sum of rows and columns of a matrix. 18-19
22. Write a program in C to check whether given matrix is identity. 19-20
Shri G. S. Institute of Technology & Science
C Programming -Lab Assignment 5
INDEX
S. No. Programs Page no. Remarks
1. Write a program to perform arithmetic operations on integers. 1-2
2. Write a program to calculate simple interest. 2
3. Write a program to find cube of a number. 2-3
4. Write a program to find area and perimeter of rectangle. 3-4
5. Write a program to calculate exponentiation. 4
6. Write a program to calculate x to the power y. 4-5
7. Write a program to calculate sum of series. 5
8. Write a program to check if number is perfect number. 6
9. Write a program to print perfect numbers between 1 to 50. 6-7
10. Write a program to print prime numbers from 1 to 100. 7-8
11. Write a program to print Fibonacci series. 8-9
12. Write a program to print sum of digits using recursion 9
13. Write a program to find odd and even numbers. 10
14. Write a program to convert decimal to binary number. 10-11
15. Write a program to exchange two numbers. 11
16. Write a program to find factorial using recursion. 11-12
17. Write a program to check prime or Armstrong number by making 12-13
functions.
18. Write a program to check whether a number can be expressed as the 13-14
sum of two prime numbers.
19. Write a program to find the sum of natural numbers using recursion. 14-15
20. Write a program to find square of any number using functions. 15
21. Write a program to swap two numbers using functions. 16
22. Write a program to check given number is even or odd using function. 16-17
23. Write a program to check whether number is prime number or not using 17
function.
24. Write a program to find square root of any number using function. 18
25. Write a program to check whether given string is palindrome. 18-19
26. Write a program to replace all characters by lowercase. 19
27. Write a program to reverse each word in the string. 20
28. Write a program to find largest and smallest word in the string. 20-21
29. Write a program to find highest frequency character in the string. 22
30. Write a program to find frequency of each word in the string 22-24
31. Write a program to find length of the string. 24-25