Introduction to C Programming (ESCO5)
Question Bank
UNIT 1
1. Explain the structure of a C program. 6M
2. Differentiate between input and output devices. Provide examples of each and explain their roles
in a computer system. 5M
3. Explain variables and constants in C. Illustrate their definitions, differences, and give examples
in a C program. 6M
4. Explain the process of compiling and executing a C program. 6M
5. Explain the various types of files involved in C program execution. 6M
6. Explain the key components of a computer system with a neat block diagram. 6M
7. What is the difference between a character constant and a variable constant in C? 4M
8. Explain the different memory storage classes in C. 7M
9. What is flowchart? Explain with an example. 7M
10. Explain the role of different files used in a C program (source file, object file, and executable
file). 7M
11. Develop a C program to accept two numbers from the user and print their sum, difference,
product, and quotient. 6M
12. Develop a C program to convert temperature from Celsius to Fahrenheit. (Formula: F=C(9/5)+32)
6M
2
13. Develop a C program to calculate the area and circumference of a circle. (Area=πr and
Circumference=2 πr) 6M
14. Develop a C Program to find the sum of first natural numbers using the expression n(n+1)/2. Also
calculate and display the average of these numbers. 6M
15. Develop a C program to enter the marks of three subjects for two students, calculate the
percentage of marks for each student, and find and display the average percentage of both
students. 8M
16. List the rules for defining an identifier name in C. Give examples. 5M
17. Explain the fundamental data types in C with examples. 6M
UNIT 2
1. Explain the difference between type conversion and typecasting in C with examples. 5M
2. List and briefly explain conditional branching statements in C with examples. 8M
3. Explain with examples any two types of operators in C. 6M
4. Explain the use of for, while, and do-while loops in C. 6M
5. Explain the role of break, goto and continue commands in C programming. 6M
6. What are relational operators in C? 6M
7. Describe how to handle multiple conditions using the switch statement in C. 7M
8. Define type casting. Develop a C program to extract and print the digit of the integral of a floating
point of a number. 7M
9. Develop a C program to calculate and print the first n Fibonacci numbers using for loop. 7M
10. Develop C program to create a calculator using a switch statement. 10M
11. Explain in detail the different types of loops available in C. 10M
12. Develop a C program to check the number is even or not. 6M
13. Develop a C Program to enter the marks of a student of three subjects. Calculate the percentage and
assign the grade based on the percentage. Display both percentage and grade. (Grade ‘S’ if percentage
is >90, grade ‘A’ if percentage is 90-80, grade ‘B’ if percentage is 79-65, grade ‘C’ if percentage is
64-50, grade ‘D’ if percentage is 49-40, ‘F’ otherwise). 8M
14. Develop a C program to check whether a character entered by the user is an uppercase or lowercase
or special character. 6M
15. Develop a C program to compute and display the sum of ‘n’ natural numbers using a while loop.5M
16. Develop a C program to print all odd numbers between 1 and 50 using for loop. 8M
17. Develop a C program to display a multiplication table for numbers from 1 to 10 using nested loops.
10M
18. Develop a C Program to implement Matrix multiplication and validate the rules of multiplication. 8M
19. Develop a C program to find all prime numbers between two numbers input by the user. 6M
20. Write a C program to find whether a number is divisible by both 3 and 5 using if statement. 6M
21. Explain the use of the switch statement in C with An example. 6M
22. Explain the concept of nested if-else statements with an example. 7M
UNIT 3
1. Define a function. Explain the difference between a function declaration and a function definition
with an example. 6M
2. Explain the concept of global and local variables with a program example. 6M
3. Differentiate between call by value and call by reference with a brief example. 6M
4. Explain the purpose of the return statement in C. Write a program to demonstrate its use in calculating
the area of a rectangle. 7M
5. Develop a program to swap two numbers using call by reference. 6M
6. Develop a C program using a recursive function to find the factorial of a given number. 7M
7. Develop a program to implement the Fibonacci sequence using a recursive function. 7M
8. Develop a program to find the greatest of three numbers using a user-defined function. 6M
9. Develop a program to find the sum of all even numbers in an array using a user-defined function. 8M
10. With syntax and example, explain how to declare, call and define user defined function. 7M
11. Develop a C program to calculate the area and perimeter of a rectangle using function. 7M
12. Develop a C program to calculate the area of circle and triangle using functions. 8M
13. Describe the process of declaring and initializing a one-dimensional array. Provide an example. 8M
14. Define an array. Develop a C program to read array of n elements. 6M
15. Develop a program to calculate the sum of all elements in an array. 6M
16. Develop a program to find the largest and smallest elements in an array. 8M
17. Develop a C program to Implement Matrix multiplication and validate the rules of multiplication. 8M
18. Create a program to sort an array of integers in ascending order using the Bubble Sort technique. 8M
19. Develop a C program to perform matrix addition using two-dimensional arrays. 8M
20. Develop a C program to read the details of 3 students (name, age, marks) using an array of structures
and display the details of the student. 8M
21. Explain how array elements can be passed into a function with an example. 6M
22. Develop a C program to multiply two numbers using functions. 6M
23. Define function? Develop a C program to add two integers using functions 6M
24. Define storage class explain the different storage classes supported by c. 5M
UNIT IV
1. Briefly explain declaration, initialization of 2D array with syntax and example. 6M
2. Develop a C program to read two strings and concatenate them using string handling function. 6M
3. Develop a C program to read n integers into an array and sort them using selection sort algorithm.
6M
4. Explain with an example how 1D and 2D arrays are stored in memory. 6M
5. Develop a C program to create and display the elements of a 3x3 matrix. 6M
6. Develop a C program to add two 3x3 matrices using two-dimensional arrays. 7M
7. Write a program to read a string and display its characters one by one. 6M
8. What is a scanset in C? Provide an example of how it is used to suppress input. 6M
9. Write a program to count the number of characters in a string. 6M
10. Write functions to implement string operations such as compare, concatenate,string length Convince
the parameter passing techniques. 7M
11. Develop a program to compare two strings character by character. 8M
12. Explain the use of scanf with scanset to input specific patterns from a string. 6M
13. Compare Bubble Sort and Selection Sort in terms of time and space complexity. 7M
UNIT V
1. Define string. Explain any three string handling functions using examples. 6M
2. Write the functions to implement string operations such as, compare, concatenate, and string
length calculation. 8M
3. Define structure. Implement structure to read, write and compute average marks of three students.
8M
4. What is pointer? Explain pointer declaration and initialization with an example. 6M
5. Develop a C program using pointers to compute sum, mean and standard deviation of all elements
stored in an array. 6M
6. Differentiate between array and structures with suitable example. 6M
7. What is structure? Explain C syntax of structure declaration with an example. 6M
8. Write a program to read and display employee’s details using structure. 7M
9. Using suitable code, Discuss the working of the following string functions 8M
i. Strcat
ii. Strlen
iii. Strstr
iv. Strcmp
10. Write a C program to swap two integer values using pointers. 6M
11. What is a pointer? How is it different from a regular variable in C? 4M
12. Explain the syntax for declaring and initializing a structure with an example. 6M
13. Write a C program to check whether a given string is a palindrome. 7M
14. Write a C program to implement a function that returns the sum of two integers using pointers.
7M
15. Write a C program to input and display details of a book using a structure (title, author, price).
6M
16. Write a C program to create an array of structures representing employees with fields name, id,
and salary. Display the details of all employees. 7M
17. Write a C program to calculate the area and perimeter of a rectangle using a structure. 7M