Structure Based Array - Scenario-Based Questions
Student Marks Management
Scenario: You are tasked with creating a program for managing the marks of 50 students in a
school.
Problem: Write a program that stores student information (name, roll number, and marks in 5
subjects) using an array of structures. The program should calculate and display the average marks
for each student.
Employee Salary Sorting
Scenario: In a company, the HR department needs to manage employee salary details.
Problem: Write a program using an array of structures to store employee information (employee ID,
name, and salary). The program should sort the employees based on their salary in descending
order and display their details.
Product Stock Management
Scenario: A local retail shop needs to manage its product inventory.
Problem: Write a program using an array of structures to store product details (product name,
product ID, and price). The program should allow the user to display all products, search for a
product by its ID, and display the total stock value (price * quantity) for all products.
Course Registration System
Scenario: A university offers multiple courses each semester, and students need to register for
them.
Problem: Create a structure to store course details (course ID, name, and credit hours) and student
details (student ID, name, and registered courses). Write a program that uses an array of structures
to store course information and another array to store student registration details. The program
should display the courses each student has registered for.
Inventory Tracking System
Scenario: A warehouse needs to keep track of the stock of multiple items.
Problem: Write a program using an array of structures to store inventory data (item ID, item name,
quantity). The program should allow the user to input data for 10 items, update the stock of an item,
and display a list of all items in the inventory.