Documente Academic
Documente Profesional
Documente Cultură
Q1. WA menu driven program in C++ program to PUSH, POP and DISPLAY in a dynamic stack. The
stack contains the following type of elements
struct Book
{ int BookNo;
char BookTitle[20];
Book *link;
};
Q2.Consider the following tables GAMES and PLAYER and write queries given below:
Table: GAMES
GCode GameName Number PrizeMoney ScheduleDate
101 Carom Board 2 5000 23-Jan-2004
102 Badminton 2 12000 12-Dec-2003
103 Table Tennis 4 8000 14-Feb-2004
105 Chess 2 9000 01-Jan-2004
108 Lawn Tennis 4 25000 19-Mar-2004
Table: PLAYER
Q2.Consider the following tables Employee and Department and write the queries given below:
Table: Employee
No Name Salary Zone Age Grade Dept
1 Mukul 30000 West 28 A 10
2 Kritika 35000 Centre 30 A 10
3 Naveen 32000 West 40 20
4 Uday 38000 North 38 C 30
5 Nupur 32000 East 26 20
6 Moksh 37000 South 28 B 10
7 Shelly 36000 North 26 A 30
Table: Department
Dept DName MinSal MaxSal HOD
10 Sales 25000 32000 1
20 Finance 30000 50000 5
30 Admin 25000 40000 7
(i) Display the AnnualSalary, Zone, and Grade of all the employees.
(ii) Display no. of employees working in each Dept along with department number where
number of employees must be at least 2.
(iii) Display Name of employee, department name of employee along with Name of HOD(in
the given pattern):
Mukul works is Sales Under Head Mukul
(iv) Add another column HireDate of type Date in the Employee table.
(v) Display the highest salary, lowest salary, and average salary of each zone
AISSSCE (Practical) 2018
Subject: Computer Science (083)
Set-3
Q1. Write a C++ program to implements a Stack using Array. The stack stores integer data. The
program should allow the user to PUSH elements into the STACK, POP elements from the STACK &
display the elements of the STACK.
Q2. Consider the following table and write queries based upon it:
Table: EMPLOYEE
SNo Name Basic Department DateofApp Age Sex
1 Karan 800 Personnel 1997-03-27 35 M
2 Divakar 9500 Computer 1998-01-20 34 M
3 Divya 7300 Accounts 1997-02-19 34 F
4 Arun 8350 Personnel 1995-01-01 37 M
5 Sabina 9500 Accounts 1996-01-12 36 F
6 John 7400 Finance 1997-02-24 38 M
7 Robert 8450 Personnel 1997-02-20 41 M
8 Vinny 7750 Computer 1998-04-15 42 F
Table: INCHARGE
SNo Dept Head
1 Personnel Rahul
4 Computer Jacob
5 Accounts Nathon
7 Finance Jacob
(i) Display the names of all employees who are more than 36 years old sorted by names.
(ii) To display the number of employees along with department name who are either working
in Accounts or Computer department.
(iii) To insert a new record in the EMPLOYEE table
(iv) To increase salary of all employees by 15% who are working in Finance department.
(v) To change the department Computer as IT in the table Employee.
(vi) Find output:-
SELECT name,department, head from EMPLOYEE A, INCHARGE B
Where A.Sno = B.Sno ;
AISSSCE (Practical) 2018
Subject: Computer Science (083)
Set-4
Q1.Write a menu driven program in C++ to perform the following functions on a binary file
“BOOK.DAT” containing objects of the following class:
class Book
{ int BookNo;
char Book_name[20];
public:
// function to enter book details
void enterdetails();
//function to display Book details
void showdetails();
//function to return Book_no
int Rbook_no() {return Book_no;}
//function to return Book_name
int Rbook_name() {return Book_name;}
};
1. Append Records
2. Search for a record with a given Book name/Book Number
3. Display all the records
4. Exit
Q2.Consider the following table EMPLOYEE and salgrade and answer
Table: EMPLOYEE
ECODE NAME DESIG SGRADE DOJ DOB
101 Abdul Ahmad EXECUTIVE S03 23-Mar-2003 13-Jan-1980
102 Ravi Chander HEAD-IT S02 12-Feb-2010 22-Jul-1987
103 John Ken RECEPTIONIST S03 24-Jan-2009 24-Feb-1983
104 Nazar Ameen GM S02 11-Aug-2006 03-Mar-1984
105 Priyam Sen CEO S01 29-Dec-2004 19-Jan-1982
Table: SALGRADE