Students can access the CBSE Sample Papers for Class 12 Computer Science with Solutions and marking scheme Term 2 Set 9 will help students in understanding the difficulty level of the exam.
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 9 with Solutions
Maximum Marks: 35
Time: 2 hours
- 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)
Write the applications of stack.
There are some applications of stack are as follows
- Infix to postfix conversion using stack.
- Evaluation of postfix expression.
- Reverse a string using stack.
- Implement two stacks in an array.
(i) Expand the following
(a) PPP → Point-to-Point Protocol
(b) MAN → Metropolitan Area Network
(ii) Name the device that is used to connect different types of networks. It performs the necessary translation, so that the connected networks can communicate properly.
Differentiate between ALTER and UPDATE commands in SQL.
Differences between ALTER and UPDATE commands in SQL are as follows:
|ALTER command||UPDATE command|
|It belongs to DDL category.||It belongs to DML category.|
|It changes the structure of the table.||It modifies data of the table.|
|Columns can be added, modified, deleted etc.||Data can be changed, updated with values and expressions.|
Which data will get added in table Company by following code?
import mysql.connector con = mysql.connector.connect (host = “localhost”, user = “system”, passwd = “hello”, database = "connect”) cur = con .cursor( ) sql = “INSERT INTO Company (Name,Dept,Sal ary) VALUES (%s, %s, %s)” val = ("ABC”, “DBA”, 35000) cur.execute(sql, val) con.commit! )
“ABC”, “DBA”, 35000
Write a output for SQL queries (i) to (iv), which are based on the table ITEMS.
Table : ITEMS
(i) SELECT MAX(Price), MIN(Price) FROM ITEMS;
(ii) SELECT Price * Qty AS AMOUNT FROM ITEMS WHERE Code=1004;
(iii) SELECT DISTINCT TCode FROM ITEMS;
(iv) SELECT IName FROM ITEMS WHERE Company LIKE “DIGIT’;
(i) Is it compulsory to provide values for all columns of a table while adding records?
No, it is not compulsory to provide values for all columns of a table while adding records. We can use NULL values wherever values are missing.
(ii) Which join is a simple SQL join condition that uses equal sign as a comparison operator?
Observe the table Product
(i) Identify the primary key.
(ii) Identify the degree and cardinality of the table.
(i) Identify the candidate keys from the table Product.
(ii) If we have another table Item whose fields are ItemID, IName, CID, then which field will be considered as a foreign key?
(ii) Degree = 5
Cardinality = 4
(i) CID, CNAME
Section – B
(Each question carries 3 Marks)
Write Push (contents) and Pop (contents) methods in Python to add numbers and remove numbers considering them to act as Push and Pop operations of stack.
Change the following infix expression into postfix expression (A+(B*C)-D/E + C ^ H)
def Push (contents): if(len(stack) >= limit): print(“Stack Overflow!”) el se: stack. append (contents) print (“Stack after Push”,stack def PopO: if (len (stack) <= 0 ): print("Stack Underflow!”) return 0 el se: return stack.pop()
Given, infix expression is
A+(B*C)-D/E + C ^ H)
(i) Give the command that displays the details of all the products, in table Product whose fields are PNo, PName, Qty, Date_Of_Mfg.
SELECT * FROM Product;
(ii) In the following query, how many rows will be deleted?
DELETE Student WHERE Student_ID = 109;
(Assuming a Student table with primary key Student_ID)
DELETE FROM Student WHERE Student_ID = 109:
Here, the “FROM” clause is missing, so the command will produce an error.
Namita has to create a database named STREAM in MySQL.
She now needs to create a table named Student in the database to store the records of various students in Stream.
The table Student has the following structure:
|Field Name||Data Type||Remarks|
Help her to complete the task by suggesting appropriate SQL commands.
CREATE DATABASE STREAM; CREATE TABLE Student (Scode Varchar(3) Primary key, Name Char(20), Age Integer, STRODE Integer, Points Integer, Grade Char(2));
Section – C
(Each question carries 4 Marks)
Answer the questions (i) to (iv) on the basis of the following tables SHOPPE and ACCESSORIES.
Table : SHOPPE
|S002||All Infotech Media||GKII|
|S004||Geeks Tecno Soft||Nehru Place|
|S005||Hitech Tech Store||Nehru Place|
Table : ACCESSORIES
(i) To display Name and Price of all the accessories in ascending order of their Price.
SELECT Name, Price FROM
ACCESSORIES ORDER BY Price;
(ii) To display Id and SName of all shoppe located in Nehru Place.
SELECT Id, SName FROM SHOPPE WHERE Area = “Nehru Place”;
(iii) To display minimum and maximum Price of each name of accessories.
SELECT MIN (Price) “Minimum Price”, MAX(Price) “Maximum Price”, Name FROM ACCESSORIES GROUP BY Name;
(iv) To display Name, Price of all accessories and their respective SName, where they are available.
SELECT Name, Price, SName FROM ACCESSORIES A, SHOPPE S WHERE A.Id = S.Id;
(i) Write any two uses of Internet.
What is the use of baud rate?
Two uses of Internet are as follows
- Internet is used for communication and information sharing.
- Business use the Internet to provide access to complex databases.
- Baud rate is a measure of the number of symbols (signals) transferred or line changes every second. It may represent more than one binary bit.
- Every symbol can represent or convey one or several bits of data. For a binary signal of 20 Hz, this is equivalent to 20 baud.
(ii) A company wants to form a network on their five computers to a server within the company premises. Represent star and ring topologies diagrammatically for this network.
Granuda consultants are setting up a secured network for their office campus at Faridabad for their day-to-day office and web based activities. They are planning to have connectivity between 3 buildings and the head office situated in Kolkata. Answer the questions (i) to (iv) after going through the building positions in the campus and other details, which are given below:
Distance between various buildings
|Building RAVI to Building JAMUNA||120 m|
|Building RAVI to Building GANGA||50 m|
|Building GANGA to Building JAMUNA||65 m|
|Faridabad Campus to Head Office||1460 km|
Number of computers
(i) Suggest the most suitable place (i.e. block) to house the server of this organisation. Also, give a reason to justify your suggested location.
The most suitable place to house the server is JAMUNA because it has maximum number of computers.
(ii) Suggest a cable layout of connections between the building inside the campus.
(iii) The organisation is planning to provide a high speed link with its head office situated in the Kolkata using a wired connection. Which of the following cable will be most suitable for this job?
(a) Optical fibre
(b) Co-axial cable
(c) Ethernet cable
(a) Optical fibre
(iv) Consultancy is planning to connect its office in Faridabad which is more than 10 km from Flead Office. Which type of network will be formed?