You are on page 1of 4

PRACTICAL LIST-C.S.

CLASS-XII
1. Find the sum of the following series: 1-u/1!+u*u/2!-u*u*u/3!

2. Define a class Travel Plan to represent a travel plan with plan code, no. of travelers, place name & no. of buses. WAP to calculate no. of buses required for a specific input from the user. 3. Define a class to represent bank account of 10 customers with the following data members: (i) name of the depositor (ii) account no. (iii) type of account (iv) balance amount To do the following task: 1. Make new bank account 2. Deposit money 3. Withdraw money 4. Display current account. 4. A college maintains a list of its students graduating every year. At the end of the year the college produces a report. WAP for it, using given inheritance: Person Student Graduate Student. 5. To display the details of the salesman who has made the maximum total sales using this pointer. 6. To shift or to write uppercase characters, lowercase characters, digits, and other characters to Upper.txt, Digit.txt and Other.txt from the text file Mix.txt. 7. WAP to search an item in an array using Linear search. 8. WAP to search an item in an array using Binary search. 9. WAP to implement Bubble sort. 10.WAP to implement selection sort. 11.WAP to merge two arrays. 12.WAP to implement insertion sort. 13.WAP to insert a node in a linked list. 14.WAP to delete a node from a linked list 15.WAP to insert an item in a stack implemented as an array. 16.WAP to delete an item from a stack implemented as an array. 17.WAP to insert a node in a stack implemented as a linked list.
1

18.WAP to delete a node from a stack implemented as a linked list. 19. WAP to insert an item in a queue implemented as an array. 20.WAP to delete an item from a queue implemented as an array. 21.WAP to insert a node in a queue implemented as a linked list. 22.WAP to delete a node from a queue implemented as a linked list. 23.WAP to implement insertion in a circular queue. 24.WAP to implement deletion in a circular queue. 25.WAP to create a class called Student having rollno, name, marks of 5 subjects as array, grade of each subject, final grade, total & average to do the following operations: (i)Input 5 data into structure (ii)Calculate total & average (iii)Assign the grade with respect to the following: 1. Greater than or equal to 80, grade is A1 2. 70 to 79, grade is B1 3. 60 to 69, grade is C1 4. 50 to 59, grade is D1 5. Less than 49, grade is E1. 26.WAP to create a binary file called Student.Dat having rollno, name, marks of 5 subjects as array, total & average to do the following operations: (i)Append 5 data (ii)Search for a particular data with respect to rollno (iii)Display the data of those who got greater than 75% 27.Write a user defined function to create an array of mxn dimensions & create a user defined function to find the sum of all elements of rows and columns and execute functions in main( ). 28.Write a user defined function to create a 2-D array of mxn dimensions & find the sum of upper and lower triangular elements. 29.WAP to create a structure called Employee having Enumber, Ename, basic, HRA, CCA, DA, PF, MA, Nsal, Gsal where Nsal=basic+HRA+CCA+DA+MA and Gsal=Nsal+PF. Input 5 data into it. Calculate Nsal and Gsal. Display all data with respect to Enumber. 30.Write a user defined function which accepts a 2-D array of its size as arguments and display the elements of the middle column.
2

31.Consider the tables Item and Customer. Write SQL commands and give outputs for SQL queries. Table : Item I_ID PC01 LC05 PC03 PC06 LC03 Item Name Personal Computer Laptop Personal Computer Personal Computer Laptop Manufacturer ABC ABC XYZ COMP PQR Price 35000 55000 32000 37000 57000

Table : Customer C_ID 01 06 12 15 16 Customer Name N Roy H Singh R Pandey C Sharma K Agarwal City Delhi Mumbai Delhi Delhi Bangalore I_ID LC03 PC03 PC06 LC03 PC01

(i) To display the details of those Customers whose City is Delhi (ii) To display the details of Item whose Price is in the Range of 35000 to 55000 (Both values included) (iii) To display the Customer Name, City from table Customer, and Price from table Item, with their corresponding matching I_ID. (iv) To increase the Price of all Items by 1000 in the table Item.
3

Item Name and

(v) SELECT DISTINCT City FROM Customer; (vi) SELECT Item Name, MAX(PRICE), Count(*) FROM Item GROUP BY Item Name; (vii) SELECT Customer Name, Manufacturer FROM Item, Customer WHERE Item.Item_Id=Customer.Item_Id; (viii) SELECT Item Name, Price*100 FROM Item WHERE Manufacturer=ABC;

You might also like