CA25101 Programming and Problem-Solving using C
Assignment
Write a program in C
1. To compute simple interest
2. To find the area of a circle (declare PI as a constant)
3. To find the greatest of three numbers using the ternary operator (? :)
4. List all prime numbers between 1 and n.
5. Generate the Fibonacci series up to n terms.
6. To reverse a number
7. To find whether a number is a palindrome or not
8. To find whether a number is perfect or not
9. To find the sum of the digits of a number
10. Find max, min and average of n numbers in ID array
11. To search a number in I D array
12. To sort n numbers in an array
13. To find the transpose of a matrix
14. To add two matrices
15. To multiply two matrices
16. To concatenate two strings
17. To check whether a string is a palindrome or not.
18. To sort n names
19. Write functions to calculate the area of a triangle and a rectangle. Write a menu-driven
program to calculate the area based on the user's choice.
20. Write a recursive function to find the factorial of a number.
21. Find GCD of two numbers using recursion.
22. To display the address and size of various variables (int, float, char, structure, union, array)
23. Swap two numbers using pointers
24. Read and display information of 5 employees using an array of structures.
25. Create a text file. Count the number of characters, words, and lines in the file