Students can access the CBSE Sample Papers for Class 12 Computer Science with Solutions and marking scheme Term 2 Set 7 will help students in understanding the difficulty level of the exam.
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 7 with Solutions
Maximum Marks: 35
Time: 2 hours
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)
Question 1.
Evaluate the following postfix expression using a stack and show content of the stack after each step. (T -True, F-False)
T, F, AND, T, OR, T, AND, F, T, AND, OR
Answer:
Given, postfix expression is
T, F, AND, T, OR, T, AND, F, T, AND, OR
Element | Operation | Stack |
T | Push | T |
F | Push | T,F |
AND | Pop two elements T and F, T AND F = F (Push) | F |
T | Push | F, T |
OR | Pop two elements T and F, T OR F = T (Push) | T |
T | Push | T,T |
AND | Pop two elements T and T, T AND T = T (Push) | T |
F | Push | T,F |
T | Push | T,F,T |
AND | Pop two elements T and F, T AND F = F (Push) | T,F |
OR | Pop two elements T and F, T OR F = T (Push) | T |
Question 2.
(i) Expand the following
(a) Wi-Fi
(b) TCP/IP
Answer:
(a) Wi-Fi – Wireless Fidelity
(b) TCP/IP – Transmission Control
Protocol/Intemet Protocol
(ii) In specific, if systems use separate protocols, which device is used to link two systems?
Answer:
Gateway
Question 3.
Write some rules for SQL commands.
Answer:
Rules for SQL commands are given below
- SQL statements can be typed in lowercase or uppercase letter. SQL statements are not case sensitive.
- The statements can be typed in single line or multiple lines.
- A semicolon (;) is used to terminate the SQL statements.
- The statements may be distributed across the line but keywords cannot be.
- A comma (,) is used to separate parameters without a clause.
- Characters and date constants or literals must be enclosed in single quotes (‘A’).
- A command can be typed either full or first four characters.
Question 4.
Amit wrote the command to create a table Student as
CREATE TABLE Student CRoll No Integer, Name Varchar (20), Marks f1oat(8, 2));
What does (8, 2) mean here?
Answer:
While specifying float columns in a table the width and the number of decimals have to be specified. Here, 8 is the total width and 2 is the number of decimal places for the “Marks” column.
Question 5.
Observe a table STUDENT and give the output of queries (i) to (iv).
Table : STUDENT
(i) SELECT Name, Gender FROM STUDENT WHERE Percentage > 75;
Answer:
(ii) SELECT COUNT (*) FROM STUDENT GROUP BY Gender;
Answer:
(iii) SELECT Name FROM STUDENT ORDER BY Percentage DESC;
Answer:
(iv) SELECT RollNo, Name FROM STUDENT WHERE Grade NOT IN (“A”);
Answer:
Question 6.
(i) Which join gives the intersection of two tables?
Answer:
Inner join
(ii) Which operator is used to compare a value to a specified list of values?
Answer:
IN operator
Question 7.
A departmental store ABC maintained their inventory using a DBMS. Name of database is ABC. Name of table is ABCSTORE, the fields in table are
Itemno – Number
Itemname- Character
Code – Numeric
Quantity – Numeric
Table : ABCSTORE
(i) Identify best suitable attribute for primary key.
(ii) Find degree and cardinality of a table ABCSTORE.
Or
(i) Insert the data (6, ‘Color Pencil’, 20, 21) in table ABCSTORE.
(ii) Identify the candidate keys from table ABCSTORE.
Answer:
(i) Itemno is most suitable attribute for a primary key.
(ii) Degree – 4, Cardinality – 5
Or
(i) INSERT INTO ABCSTORE (Itemno, Itemname, Code. Quantity) VALUES(6, Color Pencil’, 20, 21);
(ii) Itemno, Itemname
Section – B
(Each question carries 3 Marks)
Question 8.
A linear stack called ST contains the following information:
(i) Marks of a student
(ii) Name of student
(iii) Subject of student
Write the method PUSH () to push an object containing Marks, Name and Subject of student.
Or
Consider the following stack of characters, where STACK is allocated N = 8 memory
cells.
STACK: A, C, D, F, K …………
Describe the STACK at the end of the following operations. Here, Pop and Push are algorithms for deleting and adding an element to the stack.
(i) Pop (STACK, ITEM)
(ii) Pop (STACK, ITEM)
(iii) Push (STACK, L)
(iv) Push (STACK, P)
(y) Pop (STACK, ITEM)
(vi) Push (STACK, R)
(vii) Push (STACK, S)
(viii) Pop (STACK, ITEM)
Answer:
def PUSH (ST, Top):
Marks = int(input (“Enter the marks: ”))
Name = input(“Enter the name:”)
Subject = input(“Enter the subject:”)
ST1 = (Marks, Name, Subject)
ST. append (ST1)
Top = Top + 1 return Top
Or
The stack contents will be operations of stack
(i) STACK : A, C, D, F – (K is deleted)
(ii) STACK : A, C, D – (F is deleted)
(iii) STACK: A, C, D, L – (L is deleted)
(iv) STACK: A, C, D, L, P – (P is deleted)
(v) STACK : A, C, D, L – (P is deleted)
(vi) STACK: A, C, D, L, R – (R is deleted)
(vii) STACK: A, C, D, L, R, – (S is deleted)
(viii) STACK : A, C, D, L, – (S is deleted)
Question 9.
(i) A table PREPAID has following fields S_No, C_Name, Model, Connection
Write the command to delete a customer record where connection type is BSNL.
Answer:
DELETE FROM PREPAID WHERE Connection = “BSNL”;
(ii) Write the limitations of DBMS.
Answer:
There are various limitations of DBMS, in which some of them are as follows
(a) High Cost DBMS requires various types of software to be purchased. Also, it requires skilled people to operate.
(b) Failure Handling If all the data in an organisation is handled by the DBMS software, and if it fails due to some technical issue or any other issue then all work of an organisation can suffer.
(c) Security In DBMS, generally information is stored at a central place called server. If any hacker hacks that server, then all information of an organisation can be leaked.
Question 10.
Shreya has to create a database named “Manufacture” in MySQL.
She now needs to create a table named ITEM with given constraints and data types for each column.
ItemNo – integer and primary key,
Itemname – character max length 20, cannot be empty,
DOP – date type and not empty,
Quantity – numeric not empty
Answer:
CREATE DATABASE Manufacture; CREATE TABLE ITEM ( ItemNo INT, Itemname Char(20) NOT NULL, DOP Date NOT NULL, Quantity INT NOT NULL, Primary Key (ItemNo));
Section – C
(Each question carries 4 Marks)
Question 11.
Write SQL queries for (i) to (iv), which are based on tables SALESMAN and CUSTOMER.
(i) Display number of male and female salesman.
Answer:
SELECT GENDER, COUNT!*) FROM
SALESMAN GROUP BY Gender;
(ii) Display Cname, Sname and City of a salesman.
Answer:
SELECT CUSTOMER.Cname,
SALESMAN.Sname, SALESMAN.City FROM SALESMAN, CUSTOMER WHERE SALESMAN.SID=CUTOMER.SID;
(iii) Display number of salesman city wise and column name of number should “Number of Salesman”.
Answer:
SELECT City, COUNT(*) AS “Number of Salesman” FROM SALESMAN GROUP BY City;
(iv) Display’all the salesman name and their grades.
Answer:
SELECT SALESMAN.Sname,
CUSTOMER.Grade FROM SALESMAN, CUSTOMER WHERE
CUSTOMER.SID=SALESMAN.SID;
Question 12.
(i) Differentiate between long distance wireless media and short distance wireless media.
Or
What is radiowave communication? Write advantages and disadvantages of radiowave communication.
Answer:
Differences between long-distance wireless media and short distance wireless media are as follows:
Long distance wireless media | Short distance media wireless |
It supports communication over a long distance, i.e. upto thousands of kilometres. | It supports communication over a short distance, i.e. upto few kilometres. |
Microwave, radiowave and satellite communication are long distance wireless media | Bluetooth, infrared, Wi- Fi, WiMAX are short distance wireless media |
Or
When two terminals communicate by using radio frequencies, then such type of communication is known as radiowave communication.
Radiowave transmission/communication set-up has two parts; Transmitter and Receiver.
(a) Devices which transmits signals are termed as transmitter.
(b) Devices which receives signals are termed as receiver.
Both the transmitter and receiver use antennas to radiate and capture the radio signal.
Some advantages of radiowave are as follows
- Cheaper than wired network.
- Provides mobility.
- Easy to use over difficult terrain.
Some disadvantages of radiowave are as follows
- Insecure communication can be easily taped.
- It is affected by the weather conditions such as rain, storms, thunder, etc.
(ii) Explain the purpose of switch and gateway in computer networking.
Answer:
Switch: It is a multi-port bridge with a buffer and a design that can boost its efficiency and performance. It is a data link layer device. The switch can perform error checking before forwarding data which makes it very efficient as it does not forward packets that have errors and forward good packets selectively to correct port only. In other words, switch divides collision domain of hosts.
Gateway: It is a passage to connect two networks together that may work upon different networking models. It basically works as the messenger agents between systems that takes data from one system, interprets it and transmits it to the other system. It is also called protocol converter. It can operate at any network layer. It is more complex than the switch.
Question 13.
Trine Tech Corporation (TTC) is a professional consultancy company. The company is planning to set up their new offices in India with its hub at Hyderabad. As a network adviser, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned as (i) to (iv) below.
Physical location of the blocks of TTC
Block-to-Block distance (in m)
Block (From) | Block (To) | Distance |
Fluman Resource | Conference | 110 |
Human Resource | Finance | 40 |
Conference | Finance | 80 |
Expected number of computers
Block | Computers |
Human Resource | 25 |
Finance | 120 |
Conference | 90 |
(i) Which will be the most appropriate block, where TTC should plan to install their server?
Answer:
TIC should install its server in finance block as it is having maximum number of computers.
(ii) Draw a block-to-block cable layout to connect all the buildings in the most appropriate manner for efficient communication.
Answer:
(iii) What will be the best possible connectivity out of the following, you will suggest to connect the new set-up of offices in Bengaluru with its London based office.
(a) Satellite link
(b) Infrared
(c) Ethernet
Answer:
(a) Satellite link
(iv) Company is planning to connect its offices in Hyderabad which is less than 1 km. Which type of network will be formed?
Answer:
LAN (Local Area Network)