PPS LAB FILE QUESTIONS
Subject Name: - Programming for Problem Solving
Subject code: - 100111P
➢ C Programming Exercises: - Function
1. Write a program in C to swap two numbers using a function.
2. Write a program in C to check if a given number is even or odd using
the function.
3. Write a program in C to check whether a number is a prime number or
not using the function.
➢ C Programming Exercises: - Array
4. Write a program in C to store elements in an array and print them.
5. Write a program in C to read n number of values in an array and display
them in reverse order.
6. Write a program in C for adding two matrices of the same size.
➢ C Programming Exercises: - Recursive functions
7. Write a program in C to print the Fibonacci Series using recursion.
8. rite a program in C to print the first 50 natural numbers using recursion.
➢ C Programming Exercises: - Pointers, Structures and dynamic memory
allocation: -
9. Write a program in C to add two numbers using pointers.
[Link] a program in C to add numbers using call by reference.
[Link] a program in C to find the largest element using Dynamic
Memory Allocation.
[Link] a structure called "Student" with members name, age, and total
marks. Write a C program to input data for two students, display their
information, and find the average of total marks.
➢ C Programming Exercises: - File handling
[Link] a program in C to create and store information in a text file.
[Link] a program in C to read an existing file.