C Programming Practice Questions
6 Marks Questions
1. Explain different types of loops in C with syntax and examples.
2. Discuss the difference between call by value and call by reference in C. Write a
short code snippet to illustrate both.
3. Explain the Von Neumann Architecture with a neat and well-labeled diagram.
Describe its main components and working in detail.
4. Explain storage classes in C with their scope and lifetime.
5. Write a C program to find the sum of digits of a number using a while loop.
6. Explain the steps involved in converting a decimal number to its binary and octal
equivalents. Convert the decimal number 125 into binary and octal form showing all
the steps clearly.
7. Write a C program to reverse an array without using another array.
8. What is recursion? Explain with an example of factorial calculation.
9. Differentiate between structure and union in C with examples.
10. Write a program using switch-case to perform a simple calculator (add, subtract,
multiply, divide).
11. Describe file handling in C and explain file modes r, w, a, r+.
12. Write a C program to input marks of 5 subjects and calculate total, average, and
grade.
13. Explain recursion and iteration with examples.
14. Write a C program to find the factorial of a number using recursion.
10 Marks Questions
1. Explain arrays and strings in C. Differentiate between one-dimensional and two
dimensional arrays. Write a program to count vowels, consonants, digits, and
spaces in a string.
2. Explain functions in C with types. Write a program using a user-defined function to
check whether a number is an Armstrong number or not.
3. Write a menu-driven program using structures to manage student records. Each
record should have Roll Number, Name, and Marks in 3 subjects. Perform
operations to add, display, and find the student with the highest total.
4. Explain nested structures in C. Write a program to store and display employee
details using a structure containing another structure for address.
5. Explain compile-time and run-time errors with examples. Write a program to show a
logical error and correct it.
6. Explain switch-case and break statements with flow control. Write a program using
switch-case to check even/odd, find factorial, and exit.
7. Explain arrays of pointers and pointers to arrays with syntax and examples. Write a
program using an array of pointers to store and display multiple strings.
8. Explain the concept of loops and conditional statements in C. Write a program to
count digits in a number and check if it is Palindrome.
9. Explain recursion in detail. Write a recursive function to generate Fibonacci series
up to n terms.
16 Marks Questions
1. Explain loops and conditional statements in C. Write a program to input a number
and check whether it is a Palindrome and also count total digits.
2. Explain arrays in C and their importance. Write a program to input elements in an
array and find the largest and smallest number without using library functions.
3. Explain functions in C and their advantages. Write a program using a user-defined
function to check whether a number is Prime or not.