CBSE Sample Papers for Class 12 Informatics Practices Paper 2 are part of CBSE Sample Papers for Class 12 Informatics Practices. Here we have given CBSE Sample Papers for Class 12 Informatics Practices Paper 2.

CBSE Sample Papers for Class 12 Informatics Practices Paper 2

Board CBSE
Class XII
Subject Informatics Practices
Sample Paper Set Paper 2
Category CBSE Sample Papers

Students who are going to appear for CBSE Class 12 Examinations are advised to practice the CBSE sample papers given here which is designed as per the latest Syllabus and marking scheme, as prescribed by the CBSE, is given here. Paper 2 of Solved CBSE Sample Paper for Class 12 Informatics Practices is given below with free PDF download solutions.

Time Allowed: 3 hours
Maximum Marks: 70

General Instructions

  • All questions are compulsory.
  • Answer the questions after carefully reading the text.

Question 1.
(a) Name any two Indian scripts included in UNICODE.
(b) Write one basic difference between free software and open source software.
(c) Name the factors that affect the performance of the network.
(d) Which protocols are used to send and retrieve messages via electronic mail?
(e) Koshin analysis that a switch cannot stop traffic (data packets) destined for different LAN segment from travelling to all other LAN segments. What is the solution to this problem?
(f) Smitha has started a small business with 50 employees. She needs to do certain activities on daily basis like meeting circulars, file sharing, sending invoices to outside companies. Someone has told her that networking is the solution of all the stated problems. In the light of this statement mention the benefits and preventive measures of opting networking in business.
(g) How many types of font categories are used by Indian language computing?

Question 2.
(a) How many times the following while loop get executed?

int a = 10; 
while(a <= 30)
{
a = a+10;
}

(b) Write any two applications of XML.
(c) Rewrite following while loop into a for loop:

int stripes =0; 
whi1eCstripes <= 13)
{
if(stripes%2 == 2)
{
System.out.println("color code Red"):
else
{
System.out.println("color code Blue");
}
System.out.println("New stripe”); 
stripes = stripes+1;
}

(d) In Java, a class Fruit has a sub class Mango. Which of the following statement true and why?
(i) Class Mango can have no sub class.
(ii) Class Mango can have no other parent than Fruit.
(iii) Class Fruit can have at most one sub class.
(iv) Class Mango can have no sibling classes.
(e)
(i) Use a definition list to show that word “Happy” means “joyous, cheerful, delighted” and the other word “Funny” means “comical, amusing, entertaining”.
(ii) What will be display in jTextArea 1 after the execution of the following loop?.

forCint n=5; n<=25; n+=5)
jTextAreal. setText(jTextAreal. getTextC)+" " +Integer.toString(2*n));

Question 3.
(a) What will be the output of the following code?

mysql> SELECT CONCAKL0WER('CLASS'), UPPER('xi i'));

(b) What is the query called that combines rows in two or more tables?
(c) Brachi created the following table with the name ‘PROJECT’:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 2
(i) Now, Prachi wants to delete the ‘Faculty_Name’ column. Write the MySQL statement.
(ii) Write a query to add another column name ‘Role’ as varchar(20).
(d) Malvika wants to add the Salary and Commission for all the salesmen whose details are stored in table SALES as shown below:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 3
But when she issues the query as:
SELECT SN, Salary + Commission FROM SALES;
The result shown is
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 4
She is getting total only for salesmen Raghav, Navjot and Anand and for others, she is not getting the total rather just NULL.
(i) What is the problem with the query?
(ii) What is the solution to this problem?
(e)
(i) State difference between date functions NOW( ) and SYSDATE( ) of MySQL.
(ii) Given below is the table ‘GAME’:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 5
The following statements are entered:

SET AUTOCOMMIT = 0;
INSERT INTO GAME VALUES(4, 'Tennis');
COMMIT ;
UPDATE GAME SET Game_Name='Chess' WHERE SNo=4; 
SAVEPOINT A;
INSERT INTO GAME VALUES(5, 'Football'); 
SAVEPOINT B;
INSERT INTO GAME VALUES!6, 'Baseball'); 
SAVEPOINT C;
ROLLBACK TO B;

Now, what will be the output of the following statement?

SELECT * FROM GAME;

Question 4.
(a) What will be displayed in jTextAreal after executing the following statement?

jTextAreal.setText("Unity\n In\n Diversity\tlndia");

(b) (i) Consider the following code snippet:

if(aNumber>=0)
if(aNumber==0)
System.out.pri ntl n("fi rst string"); 
else
System.out.println("second string"):
System.out.println("third string"):

I. What output do you think the code will produce if aNumber is 3?
II. Use braces, {and}, to further clarify the code.
(ii) What will be displayed after the following code is executed?

String str="A horse is a horse, of course, of course":
System.out.pri ntl n("Char's'at first occurrence:"+str.indexOf('s')): 
System.out.println("Char's'at last occurrence:"+str. 1astIndexOf(’s')):
System.out.println("String\"horse\"at first occurrence:"+str. indexOf("horse"));
System.out.println("First occurrence of Char 's' from 6th indexonwards:" +str.indexOf('s',6));
System.out.println("First occurrence of StringV'rseV'from 16th , in string:" +str.indexOf(”rse",16));

(c)
(i) Manvi created an application with three radio buttons. Now, Manvi has found that more than one radio button can be selected. How can Manvi correct this error?
(ii) The following code has some errors. Rewrite the correct code underlining all the corrections made:

public Class XYZ
{
Int a=3;
public void show(int b)
{
System.out.println("b=”+b);
System.out.println("a="+a);
}
public void show(int x)
{
System.out.println("a="+a)
}
}

(d) Design an application that performs arithmetic operations (+, -, *, /). The sample screens shot is given below:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 9
The specifications for above application are given below:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 10
(i) Write code to add, divide the two numbers for the respective buttons.
(ii) Write code to clear contents of all the text fields when Clear button is clicked.
(iii) Write code to allow only numbers in the two text fields nl and n2.

Question 5.
(a) Write two examples of DML commands to SQL.
(b) EMPLOYEE table has 5 rows and 2 columns and DEPARTMENT table has 3 rows and 4 columns.
A person writes a SQL command as

SELECT * FROM EMPLOYEE, DEPARTMENT;

What would be the degree and cardinality of the resultant relation?
(c) Write SQL command for (i) and (ii) and output for (iii) and (iv) on the basis of given table PUBLISHER.
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 11
(i) To display the details of all PUBLISHERS, which have PDate in between 1975-01-01 and 1998-01-01.
(ii) To list name of publisher whose location is ‘London’.

(iii) SELECT PID, Name, Location FROM PUBLISHER WHERE TitlesNo <=1;
(iv) SELECT PID, Name FROM PUBLISHER WHERE Name LIKE ’ ne’ ;

(d) Explain the following functions and give output of each of the statement.

(i) SELECT LOWER!’INFORMATION’) ;
(ii) SELECT SORT! 16) ;
(iii) SELECT LENGTH! ’ COMPUTER’) ;
(iv) SELECT INSTR! ’ Programming ’ , ’ming’) ;

Question 6.
(a)
(i) Write the MySQL command to create the EVENT table with the following specification:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 18
(ii) Consider the following tables CONSIGNOR and CONSIGNEE.
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 19
I. Which column is used to relate these two tables?
II. Which column is used to primary key for table CONSIGNEE?
(b) With reference to the above given tables(in Q6 (a)(ii)), write SQL commands for the statements (i) and (ii) and give output for SQL query (iii).
(i) To display the CneelD, CnorName, CnorAddress, CneeName, CneeAddress for every consignee.
(ii) To display number of consignors from each City.
(iii) SELECT CneeName, CneeAddress FROM CONSIGNEE WHERE CneeCity NOT IN ( ‘Mumbai’, ‘Kolkata’ ) ;

Question 7.
(a) How is back-end linked to a database and a server?
(b) Name any three B2B applications area in the world.
(c) Varsha is creating a form for the hotel where she works, help her to choose most appropriate controls from ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox, Label and CommandButton for the following entries:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 21

Answers

Answer1.
(a) Bengali, Devnagari
(b) Difference between free software and open source software is as follows:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 1
(c) The following are the factors that affect the performance of the network:
(i) Number of users
(ii) Types of transmission medium
(iii) Hardware
(iv) Software
(d) Post Office Protocol (POP) and Simple Mail Transfer Protocol (SMTP) are used to send and retrieve message via electronic mail.
(e) The solution to the given problem is to use a router. The routers filter network traffic based on IP addresses. The IP address tells the router which network traffic (data packets) belongs to which LAN segment.
(f) Benefits of networking are as follows: .
(i) The potential advantage of networking is sharing peripherals, data and information, processor etc., can be shared over the network.
(ii) Easy to access remote database such as a person sitting at his PC to make reservation for aeroplanes, trains, hotels and so on anywhere in the world with instant confirmation.
Preventive measures of networking are as follows:
(i) Implement proper security policy for your organisation.
(ii) Use proper file access permissions when sharing files on the Internet.
(iii) Disconnect from the Internet when away.
(g) Fonts can be categorised on the basis of two parameters which are as follows:
(i) On the basis of technical specifications, fonts can be categorised as: True Type Font (TTF) It is normally 8 bits font and used with the Windows and Mac operating systems. Open Type Font (OTF) It is 16 bits font that allows the handling large glyph sets using UNICODE encoding.
(ii) On the basis of font configuration, fonts can be categorised as: Static Fonts They will appear all times in identical shapes and are stored in font files. Dynamic Fonts The handwritten fonts or calligraphic letters are dynamic fonts because of they generate individual variations.

Answer 2.
(a) 3 times
(b) The applications of XML are as follows:
(i) Web publishing
(ii) Web searching and automating Web tasks.

(c)

forCint stripes = 0; stripes <= 13;stripes++)
{
if(stripes%2 == 2)
{
System. out. println("color code Red”);
}
else
{
System.out.println("color code Blue");
}
System.out.println("New stripe");
}

(d) Only statement (ii) is true, because Java does not support multiple inheritance, which means a class have just one super class and not more than one super class.
(e)

(i) 
<HTML>
<B0DY>
<DL>
<DT> Happy </DT>
<DD> joyous </DD>
<DD> cheerful </DD>
<DD> delighted </DD>
<DT> Funny </DT>
<DD> comical </DD>
<DD> amusing </DD>
<DD> entertaining </DD>
</DL>
</B0DY>
</HTML>

(ii) Output of the given loop will be displayed as in the jTextAreal. 10 20 30 40 50

Answer 3.
(a)
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 6
(b) Join Query
(C)

(i) ALTER TABLE PROJECT DROP Faculty_Name;
(ii) ALTER TABLE PROJECT ADD Role VARCHAR(20);

(d)
(i) The problem is that when NULL value is added/subtracted/multiplied/divided with any
other value, the result is always NULL. Hence, for Salary + Commission expression, if the commission is NULL the result is also NULL.
(ii) Solution to this problem is that first the NULL values in the Commission column should be replaced with 0 (zero) using UPDATE command given below and then the given SELECT query be re-issued.
UPDATE SALES SET Commission=0 WHERE Commission IS NULL;
(e)
(i) Differences between NOWQ and SYSDATEQ of MySQL are as follows:
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 7
(ii) Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 8

Answer 4.
(a) Output will be displayed in jTextAreal as follows:
Unity
In
Diversity India
(b)
(i) Output
I. second string
third string

II. if(aNumber>=0)
{
if (aNumber==0)
{
System.out.println("first string");
}
else 
{
System.out.printlnC'second string"); .
}
}
System.out.println("third string");

(ii) Output

Char ' s ' at first occurrence: 5
Char 's' at last occurrence:38 
String "horse” at first occurrence: 2
First occurrence of Char 's' from 6th index onwards: 9 
First occurrence of String "rse" from 16th in string: 26

(c)
(i) The correct code should be as:

<F0RM>
<input type="radio" name="course" value="BA" checked>BA</input> 
<input type="radio" name="course" value="MA">MA</input>
<input type="radio" name="course" value="BSC">BSC</input>
</F0RM>

(ii) The correct code is:

public class XYZ 
{
int a=3;
public void show(int b)
{
System.out.println("b="+b);
System.out.println("a="+a);
}
public void show()
{
System.out.println("a="+a) ;
}
}

(d)
(i) private void jAddActionPerformed(java.awt.event.ActionEvent evt)

{
int numl=Integer .parselnt(nl .get.Text()); 
int num2=Integer.parseInt(n2.getText()); 
int sum=numl +num2 ;
result.setText(sum+" ") ;
}
private void jDivActionPerformed(java.awt.event.ActionEvent evt)
{
float numl=Fl oat.parseFloat(nl.getText()); 
float num2=Float.parseFloat(n2.getText()); 
float div=numl/num2; result.setText( div+" " ) ;
}

(ii) private void jClearActionPerformedCjava.awt.event.ActionEvent evt)

{
n1. setText(" "); 
n2. setText(" "); 
result.setText(" ");
}

(iii) To ensure that only number keys are typed in the text field, KeyTyped event handler should be written for the text field.
private void nlKeyTyped (java.awt.event.KeyEvent evt)

{
char kp = evt.getKeyChar() ;
if(!((kp>=’0’)&&(kp<=’9′))||kp == KeyEvent.VK_BACK_SPACE||kp = KeyEvent.VK_DELETE)
evt.consume() ;
}
private void n2KeyTyped(java.awt.event.KeyEvent evt)
{
char kp = evt.getkeyChar() ;
if(I ((kp>=’0′) && (kp<=’ 9′))||Kp == KeyEvent.VK_BACK_SPACE – ||kp = KeyEvent.Vk_ DELETE)
evt.consume() ;
}

Here, consume( ) method of KeyEvent object reject the key, if the key pressed is not between ‘0’ to ‘9’ or BACKSPACE or DELETE.

Answer 5.
(a) Two examples of DML commands are: SELECT, INSERT
(b) Degree = 2 + 4 = 6
Cardinality = 5 x 3 = 15
(C)

(i) SELECT * FROM PUBLISHER
WHERE PDate BETWEEN 1975-01^01 AND 1998-01-01;
(ii) SELECT Name. Location FROM PUBLISHER .
WHERE Location= ’London’ ;

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 12
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 13
(d)

(i) LOWER (str) converts the characters in string ’str’ in lowercase.

SELECT LOWER ( ’INFORMATION’ ) ;

Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 14
(ii) SORT (value) returns the square root of a non-negative number, ‘value’.

SELECT SORT(16);

Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 15
(iii) LENGTH (str) returns the length of the string in bytes.

SELECT LENGTH(’COMPUTER');

Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 16
(iv) INSTR (str, substr) function is used to return the position of first occurrence of substr in str.

SELECT INSTR( 'Programming',’ming' ) ;

Output
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 17

Answer 6.
(a)

(i) CREATE TABLE EVENT ,
(Id INTEGER(4) PRIMARY KEY,
Company_name VARCHAR(10) NOT NULL.
Company_code VARCHAR(20),
Host_name VARCHAR(30),
Client_address VARCHAR(20),
DateOfEvent DATE 
);

(ii)
I. CnorlD
II. CneelD
(b)

(i) SELECT CneelD, CnorName, CnorAddress, CneeName, CneeAddress FROM CONSIGNOR, CONSIGNEE WHERE CONSIGNOR.CnorlD = CONSIGNEE.CnorlD ;
(ii) SELECT CneeCity. C0UNT( * ) FROM CONSIGNEE GROUP BY CneeCity;

CBSE Sample Papers for Class 12 Informatics Practices Paper 2 20
Answer 7.
(a) The back-end is responsible for serving all the user requests. To serve the user requests, it has to interact with database to obtain data and to server to get the work done. After processing the given requests and queries, the server returns the results, which the back-end first interrupts and then passes them over to front-end.
(b) Three B2B applications area in the world are as follows:
(i) Supplier management
(ii) Payment management
(iii) Distribution management
(c)
CBSE Sample Papers for Class 12 Informatics Practices Paper 2 22

We hope the CBSE Sample Papers for Class 12 Informatics Practices Paper 2 help you. If you have any query regarding CBSE Sample Papers for Class 12 Informatics Practices Paper 2, drop a comment below and we will get back to you at the earliest.