Question Bank PPS Updated
Question Bank PPS Updated
BTL2
1. Explain the difference between primary and secondary
memory
BTL3
2. Construct an algorithm to calculate the factorial of a
number.
BTL3
3. Develop flowchart to determine if the user entered
number is an Armstrong number or not.
BTL3
7. Construct an algorithm and pseudocode to swap two
values without using a third variable.
BTL3
8. Develop flowchart to determine if the user entered
number is an Armstrong number or not.
BTL3
9. Develop flowchart to find number is even or odd.
BTL3
10. Develop algorithm and pseudocode to calculate area
and perimeter of rectangle.
What are Looping statements? Explain any two with syntax BTL2
1. and example.
15. Construct a program to find the sum of the individual digits of BTL3
a given number.
16. Construct a program to find the sum of even and odd numbers BTL3
from 1 to n.
*****
****
***
**
*
Unit - III
13. Explain how to use functions like malloc, calloc, and BTL2
free in C for dynamic memory management.
15. What are pointer expressions? How can they be used in BTL1
arithmetic operations?
Develop a structure named "Car" to store details like car ID, BTL3
4. model, and cost. Write a C program to input data for three cars,
and display the information.
Construct a program to read data into these and print the BTL3
13. same. Justify the need for structured data type.
File Operations
1. What function would you use to read an entire line from BTL1
a file in C?
BTL1
8. Explain the syntax for opening a file in C with a
suitable example. What parameters does it require?
BTL3
9. Develop a program that counts the number of characters
in a file.
BTL4
10. Distinguish between reading characters and reading
strings from a file.
11. What are some common reasons for failure when BTL1
attempting to open a file?
12. How can you handle errors when a file fails to open? BTL1
Provide a code snippet demonstrating this.