0% found this document useful (0 votes)
5 views3 pages

Scenario-Based Problems Structure

The document outlines five programming tasks in C, each requiring the use of structures to manage different types of data. Tasks include digitizing a library catalog, managing patient records, handling bank account transactions, processing student results, and analyzing movie ratings. Each task provides sample input and expected output to guide the implementation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Scenario-Based Problems Structure

The document outlines five programming tasks in C, each requiring the use of structures to manage different types of data. Tasks include digitizing a library catalog, managing patient records, handling bank account transactions, processing student results, and analyzing movie ratings. Each task provides sample input and expected output to guide the implementation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Q1. A university library is digitizing its catalog to improve efficiency.

Currently, book records such


as title, author, and price are stored manually, making it difficult to track valuable books. Create
a C program using a structure that stores information about multiple books and helps librarians
quickly identify the most expensive and least expensive books in the collection.

Sample input Sample output

Enter 3 books: Most Expensive Book: Data Structures (800)


Cheapest Book: C Programming (500)
Book 1:
Title: C Programming
Author: Dennis
Price: 500

Book 2:
Title: Data Structures
Author: Mark
Price: 800

Book 3:
Title: Algorithms
Author: CLRS
Price: 700

Q2. A hospital wants to improve patient data management by introducing a digital record
system. Each patient’s basic details, including name, age, and diagnosed disease, must be
stored for quick access. Construct a C program using a structure that will record each patient's
information.
Sample input Sample output

Enter 3 patients: Patients above 50:


Ali
Patient 1: Hasan
Name: Ali
Age: 55 Number of patients with Diabetes: 2
Disease: Diabetes

Patient 2:
Name: Sara
Age: 30
Disease: Flu

Patient 3:
Name: Hasan
Age: 60
Disease: Diabetes

Search Disease: Diabetes


Q3. A local bank wants to provide a simple digital solution for managing customer accounts.
Each account holder has a name, account number, and balance. Build a C program using a
structure that will allow basic banking operations such as deposits and withdrawals, and always
display the updated balance after each transaction.
Sample input Sample output

Enter account details: Updated Balance: 10500


Name: Rakib
Account No: 12345
Balance: 10000

Deposit amount: 2000


Withdraw amount: 1500

Q4. A university is developing a detailed result-processing system in which each student is


enrolled in multiple subjects. Instead of storing all data in a flat structure, the system needs a
hierarchical approach. Build a C program with a structure where each student contains multiple
subject records. The system should calculate overall performance and assign grades based on
the calculated GPA.
Sample input Sample output

Student Name: Nila Average: 80.00


Roll: 105 Grade: A
Subjects: 3

Subject 1: Math 80
Subject 2: CSE 85
Subject 3: English 75

Q5. A movie streaming platform collects ratings from users to evaluate content performance.
Each movie has a name and a rating score. Construct a C program to analyze ratings,
determine the highest-rated movie, and calculate the average rating across all movies.
Sample input Sample output

Enter 3 movies: Highest Rated: MovieB


Average Rating: 8.00
Movie 1:
Name: MovieA
Rating: 8

Movie 2:
Name: MovieB
Rating: 9

Movie 3:
Name: MovieC
Rating: 7

You might also like