Pre Board XII CS 21 22 1
Pre Board XII CS 21 22 1
Pre Board XII CS 21 22 1
General Instructions
• The question paper is divided into 3 sections – A, B and C
• Section A, consists of 7 questions (1-7). Each question carries 2 marks.
• Section B, consists of 3 questions (8-10). Each question carries 3 marks.
• Section C, consists of 3 questions (11-13). Each question carries 4 marks.
• Internal choices have been given for question numbers 7, 8 and 12.
SECTION – A
Each question carries 2 marks
1. What do you mean by LIFO and FIFO characteristics of Stacks and Queues? Also write at (2)
least two application of each stacks and queues.
2. a. Discuss any two technologies to connect to internet wirelessly. (2)
b. Define Web Browser and Web Server.
3. Answer following with reference to python-mysql connectivity :
(a) Consider the following code snippet : (1)
data= cursor.fetchone() //line 1
data1= cursor.fetchmany(5) //line 2
count= cursor.rowcount //line 3
print(count) // line 4
And answer following :
(i) What is the difference between the statements in line 1 and line2? What will be
the datatype of data and data1
(ii) What will the value be printed in line 4
(b) What will be the generated query string ? (1)
Str=”INSERT INTO student(rollno, name, marks, grade)
VALUES({}.’{}’,{},’{}’)”.format(1,’Sanyam’,75,’B’)
4. Answer Following :
(a) Ms. Das is trying to display the total marks of all students but on issuing the command (1)
Select rollno, mark1+mark2+marks3 “total” from student, she is not getting the total
marks for roll no 2 and 5. What may be the possible reason?
Rollno Marks1 Marks2 Marks3
1 45 78 45
2 NULL 62 22
3 56 95 60
4 72 78 56
5 84 63 NULL
(b) Write an example to use aggregate function without group by. (1)
5. Write the output of the queries (a) to (d) based on the table “College” given below. (2)
Table :College
No Name Age Salary Department DateofJoin Gender
1 Shalaz 45 10500 Biology 23/02/2008 M
2 Sameera 54 95000 Biology 10/01/2010 F
3 Yagyen 43 8500 Physics 21/02/2012 M
4 Pratyush 34 7500 Chemistry 22/01/2012 M
5 Aren 51 8500 Mathemati 22/01/2011 M
cs
CS – 1
6 Reeta 27 9000 Chemistry 14/02/2010 F
7 Urvashi 29 85000 Biology 10/02/2012 F
8 Teena 35 10500 Mathemati 02/02/2011 F
cs
9 Viren 49 9000 Mathemati 03/01/2008 M
cs
10 Prakash 22 8000 Physics 17/02/2009 M
(a) Select name, salary from college
Where department = ‘Physics’ and gender = ‘M’;
(b) Select name , salary from college
Where department in (‘Chemistry’,’Biology’) and age <=30;
(c) Select name , age, department from college
Where gender = ‘F” and salary >20000 and name like ‘S%’;
(d) Select max(salary), min(salary) from college
Where department = ‘Biology’;
6. Considering the following details : (2)
A SQL table ‘club’ ( memberno, name , dateofbirth, address, dateofjoin, num_dependent) ,
Database name : ‘club_details’
user name =’abcd’ and password =’depends’
CS – 2
(a) What can be the degree and cardinality of both Student and Coach tables.
(b) Write a query to perform equi join based on above two tables.
(c) What is the main point of difference between drop table and delete from
command?
(d) How can we display the structure of the table student.
SECTION – B
Each question carries 3 marks
8. Raman Working in company’s IT department had created a dictionary containing the (3)
employee number as key and name, designation and salary of employees as values in form
of a list. Write User defined functions using STACKS as follows:
(i) PUSH() to push all the employee names in the stack who are “Clerks” with
salary less than 2500.
(ii) POP() to pop the entry from stack and display it, in case stack has no entries
give appropriate message.
For eg.: Consider following dictionary :
Emp={101:[“Rahul”,”Manager”,7000],102:[“Rahim”,”Clerk”,2000],103:[“Simaran”,”An
alyst,9000],105:[“Rekha”,”Clerk”,2450],109:[“Samar”,”Clerk”,2700],110:[“Piyush”,”Cler
k”,1200]}
CS – 3
Column Name Data Type Size Constraint Description
Rollnumber Number 3 Primary Key
Class Number 2 Primary Key
Name Character 25 Should be compulsory to enter
Exam_name Character 20 Only Half Yearly, Terminal, Final
allowed
Marks Number 5,2 nonnegative and not more than 100
City Character 20 by default it should be Jodhpur
He needs to store some data in the table “Exam_detail”
Help him by writing the series of SQL commands/queries to perform above tasks.
SECTION – C
Each Question Carries 4 marks
11. Write queries (a) to (h) based on the tables STAFF and SUBJECT. (4)
STAFF
staffno firstname surname hire_date Designation Salary
102 Vikas Ahuja 15-10-2001 Professor 120000
103 Sanjay Choudhary 2-12-2004 Asso. Professor 180000
104 Raman srivastava 10-5-2005 Reader 140000
105 Shubhada Reddy 11-9-2002 Reader 110000
106 Vinay Mohant 13-6-2006 Asso.Professor 100000
107 Nirav Soni 22-8-1996 Reader 160000
SUBJECT
subno staffno subname fees
C21 102 System analysis 4000
C22 106 Sun Java NULL
C23 104 Computer Network 3000
C24 106 Web Hacking NULL
C25 102 Desk Top Publishing 1000
C26 105 C# and C++ 6000
C27 107 Visual Basic . Net 15000
(a) To display designation and number of staff getting more than 150000 salary in each
designation.
(b) To display firstname, surname, subname and fees of all staff whose designation is
‘Professor’
(c) To display all designation only once.
(d) To display all the information from subject table in alphabetical order of subname.
(e) To display all staff whose firstname starts with ‘R’ and surname ends with ‘a’ .
(f) To display all subject name with the firstname of the staff whose fees is still not decided.
(g) To display the firstname and hiredate of all readers whose salary is more than 100000.
(h) To display the firstname of the staff whose subname is “Web Hacking”
CS – 4
12.(a) Answer following : (2)
(i) Write any two advantages and two disadvantages between star topology and
bus topology.
(ii) How is IP address different from MAC address? Discuss briefly.
(b) (i) Expand and explain the protocols IMAP and VoIP. (2)
(ii) Identify domain name and URL from the following :
http://www.stannes.edu.in/login.html
OR
(i) How many switching techniques are there ? Explain any one.
(ii) Explain the difference between the terms “World Wide Web” and “Internet”.
13. XSD Institute of Senior studies in Bangalore is setting up a network between its different (4)
wings . There are four wings named as Medical(Med), Engineering(Engg), Business
Administration(BA), Foreign Language(FL).
A rough layout of same is as follows :
Med
BA
Engg
FL
CS – 5
CS – 6