Programming in C – Practicable Programming Question
Bank
Module 1: Basics, Datatypes, Operators, Expressions
1. 1. Read two whole numbers and perform addition, subtraction, multiplication, division
and remainder.
2. 2. Input p, t, r and compute Simple Interest and Total Amount (choose suitable data
types).
3. 3. Read a 3-digit number and print
(a) sum of digits
(b) reverse of number
(c) whether it is palindrome.
4. Read temperature in Celsius and convert to Fahrenheit and Kelvin.
Module 2: Branching, Loops, switch-case, Patterns
5. Print Floyd’s triangle for N rows (N > 0).
6. Menu-driven calculator using switch-case for +, -, *, / .
7. Generate Fibonacci series up to N terms.
Module 3: Arrays (1D/2D/VLA) and Pointers
8. Read N integers, store in an array, and compute sum and average.
9. Find maximum and minimum elements in a 1D array.
10.Sort an array using bubble sort (print before/after).
11.Matrix addition using 2D arrays.
12.Swap two integers using pointers.
Module 4: Functions, Parameter Passing, Recursion, Dynamic Memory
Allocation
13.Write a function to check whether a number is prime.
14.Compute factorial of a number using recursion.
15.Pass a 1D array to a function and return the sum of elements.
16.Demonstrate call by value vs call by reference using a swap function.
Module 5: Structures, Unions, Enums
17.Read and display details of N students, compute class average marks, and list students
above and below average.
18.Create an array of structures (e.g., employees/books). Display all records and search by
ID/name.
19.Use enum for weekdays. Input 1–7 and print the corresponding weekday name.