practical questions for class xii cs
practical questions for class xii cs
1. Create a text file with a shopping list (one item per line).
2. Remove a specific item from the shopping list.
3. Display the entire shopping list.
4. Exit.
6. Write a menu-driven program to:
1. Create a text file with a list of books (one book per line).
2. Count the books whose titles contain more than a given number of characters.
3. Display all books in the file.
4. Exit.
8. Write a menu-driven program to:
1. Create a binary file to store student records (Roll Number, Name, Marks, Grade).
2. Find and display all students with a specific grade.
3. Display all student records.
4. Exit.
10. Write a menu-driven program to:
1. Create a binary file to store sales records (Sale ID, Item, Quantity, Amount).
2. Calculate and display the total sales amount for a specific item.
3. Display all sales records.
4. Exit.
11. Write a menu-driven program to:
1. Create a binary file to store library details (Book ID, Title, Borrower Name).
2. Update the borrower name for a specific book ID.
3. Display all book records.
4. Exit.
12. Write a menu-driven program to:
1. Create a binary file to store product details (Product ID, Name, Stock, Price).
2. Calculate and display the total value of stock for a specific product.
3. Display all product details.
4. Exit.
13. Write a menu-driven program to:
1. Create a binary file to store customer records (Customer ID, Name, City).
2. Search for all customers in a specific city.
3. Display all customer records.
4. Exit.
14. Write a menu-driven program to:
1. Create a binary file to store employee records (Employee ID, Name, Department,
Salary).
2. Find and display the details of the employee with the highest salary.
3. Display all employee records.
4. Exit.
15. Write a menu-driven program to:
1. Create a binary file to store order details (Order ID, Customer Name, Amount).
2. Delete an order based on its Order ID.
3. Display all order details.
4. Exit.
16. Write a menu-driven program to:
1. Create a binary file to store exam scores (Student ID, Name, Marks in three
subjects).
2. Calculate and display the average marks for a specific student.
3. Display all student scores.
4. Exit.
17. Write a menu-driven program to:
1. Create a CSV file with employee records (ID, Name, Department, Salary).
2. Update the department of an employee based on their ID.
3. Display all employee records from the file.
4. Exit.
18. Write a menu-driven program to:
1. Create a CSV file with product details (Product ID, Name, Price, Quantity).
2. Calculate and display the total stock value of all products.
3. Display all product records.
4. Exit.
19. Write a menu-driven program to:
1. Create a CSV file with school student details (Roll Number, Name, Class, Marks).
2. Display all students who scored above a given threshold in marks.
3. Display all student records.
4. Exit.
20. Write a menu-driven program to:
1. Create a CSV file with event details (Event ID, Name, Venue, Date).
2. Search for all events happening at a specific venue.
3. Display all event records.
4. Exit.
Table: PRODUCT
Column Name Data Type Description
Table: EMPLOYEE
Column Name Data Type Description
ORDERS
CUSTOMERS
SALES
PRODUCTS