Question Bank PPS
Question Bank PPS
BTL2
2. Explain the difference between primary and secondary
memory
BTL3
3. Construct an algorithm and pseudocode to swap two
values without using a third variable.
BTL3
4. Develop flowchart to determine if the user entered
number is an Armstrong number or not.
BTL3
9. Construct an algorithm and pseudocode to swap two
values without using a third variable.
BTL3
10. Develop flowchart to determine if the user entered
number is an Armstrong number or not.
BTL3
11. Develop flowchart to find number is even or odd.
BTL3
12. Develop algorithm and pseudocode to calculate area
and perimeter of rectangle.
List the differences between while loop and do-while loop. BTL1
Construct a C program to find the sum of Natural numbers
7. from 1 to N using a for loop.
What are two way selection statements? Explain if, if else, and BTL1
9. cascaded if-else with examples.
10. Explain with syntax the different loops used in C program. BTL2
31. List and explain loop control (or) iteration statements in C. BTL2
37. Construct a program to find the sum of the individual digits of BTL3
a given number.
38. Construct a program to find the sum of even and odd numbers BTL3
from 1 to n.
*****
****
***
**
*
43. Distinguish between for loop and while loop BTL4
15. What are some common ways to read a string from user BTL1
input?
28. How can you use arrays and strings together to check if BTL1
a string is a palindrome?
31. What are the differences between static and dynamic BTL1
arrays?
11. Build a function is_leap_year which takes the year as its BTL3
argument, checks whether the year is a leap year or not,
and then displays appropriate message on the screen.
23. Explain how to use functions like malloc, calloc, and BTL2
free in C for dynamic memory management.
24. Develop program using function that takes two integers BTL3
as parameters and returns their sum.
30. 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
15. model, and cost. Write a C program to input data for three cars,
and display the information.
22. Distinguish between structure and union with suitable example. BTL1
Construct a program to read data into these and print the BTL3
34. same. Justify the need for structured data type.
Construct a C program to store the employee information BTL3
using structure and search a particular employee using
35. Employee number.
41. Create a structure named Book to store book details like BTL3
title, author, and price. Construct a C program to input
details for three books, find the most expensive and the
lowest priced books, and display their information.
44. Design a structure named "Car" to store details like car ID, BTL3
model, and rental rate per day. Write a C program to input
data for three cars, calculate the total rental cost for a
specified number of days, and display the results.
Unit - VI
File Operations
3. What are the different modes for opening a file, and BTL1
what does each mode signify?
4. How do you read data from a file using standard library BTL1
functions? Provide an example.
5. What function would you use to read an entire line from BTL1
a file in C?
BTL1
12. Explain the syntax for opening a file in C with a
suitable example. What parameters does it require?
BTL3
13. Develop a program that counts the number of characters
in a file.
BTL4
14. Distinguish between reading characters and reading
strings from a file.
16. What are some common reasons for failure when BTL1
attempting to open a file?
17. How can you handle errors when a file fails to open? BTL1
Provide a code snippet demonstrating this.
18. What is the importance of checking if a file opened BTL1
successfully?
22. How can you modify a program to count tabs and BTL1
spaces in a file?
26. Explain the differences between text and binary file BTL2
opening modes.
30. Illustrate how you can read a file line by line using BTL3
functions like fgets().
32. How can you handle newline characters properly when BTL1
processing file input?
33. What are the main differences between text files and BTL1
binary files?
34. When would you choose to use a binary file over a text BTL1
file?
39. How can you seek to a specific position in a file using BTL1
file handling functions? Provide an example.