CBSE Class 12 Informatics Practices (IP) Code 065 Previous Year Question Paper 2018-19 with Solutions is an excellent resource for students preparing for the CBSE Board Examination. By solving the 2018-19 board paper, students can understand the latest exam pattern, marking scheme, question types, and important topics frequently asked in the examination. The detailed solutions provided with the question paper help students learn the correct answering techniques and improve their problem-solving skills in topics such as Python Programming, Data Handling, SQL, Networking, and Database Management Systems.
Regular revision using CBSE Class 12 IP previous year question papers is one of the most effective strategies for scoring high marks in board exams. Practicing previous year papers improves time management, boosts confidence, and helps identify strengths and weak areas. Students become familiar with the difficulty level of the examination and can focus their preparation on important concepts. Solving the CBSE Class 12 Informatics Practices (065) Board Question Paper 2018-19 with Solutions also enhances accuracy, reduces exam stress, and increases the chances of achieving excellent results in the final board examination.
CBSE Class 12 IP 065 Board Question Paper 2018-19 with Solution
Exam Date Mar 23, 2019
Series BVM
Question Paper Code 90 Set 4
INFORMATICS PRACTICES (065) - PYQP 2019
(Session 2018-19)
Time allowed : 3 hours
Maximum Marks : 70
General Instructions :
- All questions are compulsory.
- Answer the questions after carefully reading the text.
- Q.2 and Q.4 have to be answered with respect to Java Language.
- Q.3, Q.5 and Q.6 have to be answered with respect to MySQL.
------
Q1. (a) Write the functions of the following pieces of network hardware:
(i) Modem
Ans: A modem converts digital signals from a computer into analog signals for transmission over telephone lines and converts incoming analog signals back into digital form.
(ii) Switch
Ans: A switch connects multiple devices in a network and sends data only to the intended device, helping in efficient communication within the network.
(b) Write two ways used to make sure that the data is secure and is available only to the intended and authorized persons in a network.
Ans: Two common ways to ensure that data is secure and accessible only to authorized persons in a network are:
(i) Encryption: Data is converted into a coded form so that only authorized users with the correct key can read it.
(ii) Authentication (User ID and Password): Users must verify their identity using credentials like usernames and passwords before accessing the network or data.
(c) Expand TCP/IP. Write the purpose of TCP/IP in communication of data on a network.
Ans: TCP/IP stands Transmission Control Protocol/Internet Protocol
It is used to manage the data transmission between two devices over the internet.
(d) Expand the following terms:
(i) MAC Address - Media Access Control Address
(ii) ODF - Open Document Format
(e) Explain in brief any one freedom offered by Open Source Software. Write one example for each of the following:
Ans: Open Source Software allows user to modify the software as per his/her needs.
(i) An Open Source Operating System
Ans: Linux
(ii) An Open Source Office Suite
Ans: Apache Open Office
Q2. (a) Write the data type of variables that should be used to store the following in Java:
(i) Sales amount (of Sales) achieved by a Sales Person
Ans: int / double / float
(ii) Roll Number of Student
Ans: int / long
(b) Distinguish between isSelected() and setSelected() methods of Java with the help of example.
Ans: isSelected() returns a bool value to tell if the radio button is selected or not while setSelected() is used to check the radio button or uncheck it.
Example: rbutton.setSelected(true); //rbutton is selected
boolean b = rbutton.isSelected(); //will tell if rbutton is selected
(c) What will be displayed in jTextField1 and jTextField2 when the following code is executed?
int x,y,z,t;
x = 3;
y = 8;
z = x+y/8;
t = z++;
jTextField1.setText(""+z);
jTextField2.setText(""+t);
Ans: jTextField1 = 4
jtextField2 = 5
(d) The following HTML code has error(s). Rewrite the correct code underlining corrections made.
<ol type="A" begin="4">
<li> List Item 1 </li>
<li> List Item 2 </li>
<li> List Item 3 </li>
<end>
Ans: <ol type="A" start="4">
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ol>
OR
Expand XML. For what purpose is XML used?
Ans: XML stands for Extensible Markup Language
XML is used to describe and store the data.
(e) Write the output that will be displayed on jLabel1 and jLabel2.
String a,b,c,d,x;
a= "Keep";
b="your";
c="surroundings";
d="clean";
int e = b.length()/4+d.length()*2;
x=b+c+d;
x=a.concat(x);
jLabel1.setText("The value of e = "+e);
jLabel2.setText(x.toUpperCase());
Ans: jLabel1 = The value of e = 11
jLabel2 = KEEPYOURSURROUNDINGSCLEAN
(f) Write the output displayed in jTextField1 and jTextField2 when the following code is executed:
char code;
int z;
z = 0;
code = ‘w’;
switch (code)
{
case ‘w’ : z = z+1;
case ‘r’ : z = z+2;
break;
case ‘s’ : z=z +3;
break;
default : z = z+4;
}
jTextField1.setText(""+z);
jTextField2.setText(""+code);
Ans: jTextField1 = 3
jTextField2 = w
OR
What happens if break statement is omitted with a case in a switch statement?
Ans: If 'break' statement is omitted with a case in a switch statement then the control of the program will move to the next case statement instead of exiting the switch statement.
Q3. (a) In CHAR(10) and VARCHAR(10), what does the number 10 indicate?
Ans: Number 10 indicates the maximum size of the attribute.
(b) ‘Employee’ table has a column named ‘CITY’ that stores city in which each employee resides. Write SQL query to display details of all rows except those rows that have CITY as ‘DELHI’ or ‘MUMBAI’ or ‘CHANDIGARH’.
Ans: SELECT * FROM Employee WHERE CITY NOT IN ("DELHI", "MUMBAI", "CHANDIGARH");
(c) Consider the following table:
| STUDENTID | NAME | EXAMID | SCORE |
|---|---|---|---|
| 10 | Leena | 1 | 20 |
| 10 | Leena | 2 | 25 |
| 11 | Samarth | 1 | 30 |
| 11 | Samarth | 2 | 35 |
| 12 | Jai | 1 | 14 |
| 12 | Jai | 2 | 15 |
| 14 | Shoaib | 1 | 30 |
| 14 | Shoaib | 2 | 12 |
Abhay wants to know the number of students who took the test. He writes the following SQL statement to count STUDENTID without duplicates. However the statement is not correct. Rewrite the correct statement.
SELECT DISTINCT(COUNT STUDENTID) FROM RESULTS;
Ans: SELECT COUNT(DISTINCT STUDENTID) FROM RESULTS;
(d) Aman has used the following SQL command to create a table 'stu':
CREATE TABLE stu
(
id INTEGER,
name VARCHAR(100)
);
Then, Aman enters the following SQL statements to enter 4 rows :
INSERT INTO stu VALUES (1, "abc");
INSERT INTO stu VALUES (2, "abc");
INSERT INTO stu VALUES (3, "bcd");
Write the output that will be produced by the following SQL statement :
SELECT name, Count(*) FROM stu GROUP BY name;
Ans: Output
| Name | Count(*) |
|---|---|
| abc | 2 |
| bcd | 1 |
(e) Write SQL statement to add a column "COUNTRY" with data type and size as VARCHAR(70) to the existing table named "PLAYER". Is it a DDL or DML or TCL command?
Ans: ALTER TABLE PLAYER ADD COLUMN COUNTRY VARCHAR(70);
It is a Data Definition Language (DDL) command.
(f) Table Student has the columns RNO and SCORE. It has 3 rows in it. Following two SQL statements were entered that produced the output (AVG(SCORE) as 45 and COUNT(SCORE) as 2):
(i) AVG (SCORE)
(ii) COUNT (SCORE)
Data in SCORE column is same in two rows. What data is present in the SCORE column in the three rows?
Ans: SCORE
45
45
NULL
Q4. (a) What will displayed in jTextField1 when the following code is executed?
int x=3, y=6, z=0;
if(x>3)
z = z + 1;
if((x<4)&&(y>6))
z = z + 2;
if(x>2 && y>=6)
z = z + 3;
if((x<3) || (y>6))
z = z + 4;
jTxtFieldl.setText(""+z);
Ans: jTextField1 = 3
(b) Rewrite the following code after correcting errors. Underline the corrections made.
int a, c;
30 = c;
4 = a;
while do (c>10)
{
a = = a + c;
c = c-5;
}
Ans: int a, c;
c = 30;
a = 4;
while(c>10)
{
a = a + c;
c = c-5;
}
(c) How many times will the following loop execute?
int K = 7;
int I = -2;
do
{
I=I+2;
K=K-1;
}
while (I <= K);
Ans: Loop will be executed 4 times.
OR
How many times will the following loop execute?
for (i = 2; i <=5;i++)
{
z = i;
}
Ans: Loop will be executed 4 times.
(d) Write the output in jTextField1 when the following code is executed:
int k, n, sum = 0;
for (k = 2; k <=5; k++)
{
n = k - 2 * 3;
sum = sum + n;
}
jTextField1.setText(""+sum);
Ans: jTextField1 = -10
OR
Write the output in jTextField1 when the following code is executed:
int k, n =0, sum = 0;
k = 2;
while (k<=5)
{
n = k +4;
sum = sum + n;
k=k+2;
}
jTextField1.setText(""+n);
Ans: jTextField1 = 8
(e) Write the values of i and k after execution of the following code:
int i,j,k;
i = 2;
j = 8;
k = 6;
do
{
i = i + 4;
k = k + i;
}
while (i < j);
Ans: i = 10
k = 22
(f) Ms. Supriya works as a programmer in a courier company, ‘‘ABC Packaging and Shipping Service’’ where she has designed a software to compute charges to be paid by the customers.
- Weight (in grams) of the parcel is entered by the user.
- Any one Category of parcel out of A/B/C is chosen by the user.
- Based on the Category selected, Transportation Charges (per gram) are computed according to the following criterion:
| Category | Transportation Charges Per Gram |
|---|---|
| A | Rs 2.00 |
| B | Rs 3.00 |
| C | Rs 5.00 |
- Insurance Charges is a flat < 80.00 per parcel.
- Total Transportation Charges = Transportation Charges Per gram * Weight in grams (of parcel) entered by the user.
- Total Charges = Total Transportation Charges + Insurance Charges.
Help Ms. Priya in writing the code to do the following :
(i) When Calculate Charges button is clicked, Insurance Charges, Transportation Charges per gram, Total Transportation Charges and Total Charges should be calculated and displayed in the respective text fields.
Ans: //Calculate
float wt = 0, tcpergram = 0, ttc = 0, ic = 0, totalc = 0;
wt = Float.parseFloat(jTextField1.getText());
if(jRadioButton1.isSelected())
tcpergram = 2;
else if(jRadioButton2.isSelected())
tcpergram = 3;
else if(jRadioButton3.isSelected())
tcpergram = 5;
ic = 80;
ttc = tcpergram*wt;
totalc = ttc+ic;
jTextField2.setText(“ ”+ic);
jTextField3.setText(“ ”+tcpergram);
jTextField4.setText(“ ”+ttc);
jTextField5.setText(“ ”+totalc);
(ii) When ‘CLEAR’ button is clicked, all the textfields and radiobuttons should be cleared.
Ans: //Clear
jTextField1.setText(“ ”);
jTextField2.setText(“ ”);
jTextField3.setText(“ ”);
jTextField4.setText(“ ”);
jTextField5.setText(“ ”);
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
jRadioButton3.setSelected(false);
(iii) When ‘Exit’ button is clicked, the application should close.
Ans: //Exit
System.exit(0);
Q5. Consider the following table ‘Transporter’ that stores the order details about items to be transported. Write SQL commands for the statements (i) to (viii) and write output for SQL queries (ix) and (x).
| ORDERNO | DRIVERNAME | DRIVERGRADE | ITEM | TRAVEL DATE | DESTINATION |
|---|---|---|---|---|---|
| 10012 | RAM YADAV | A | TELEVISION | 2019-04-19 | MUMBAI |
| 10014 | SOMNATH SINGH | FURNITURE | 2019-01-12 | PUNE | |
| 10016 | MOHAN VERMA | B | WASHING MACHINE | 2019-06-06 | LUCKNOW |
| 10018 | RISHI SINGH | A | REFRIGERATOR | 2019-04-07 | MUMBAI |
| 10019 | RADHE MOHAN | TELEVISION | 2019-05-30 | UDAIPUR | |
| 10020 | BISHAN PRATAP | B | REFRIGERATOR | 2019-05-02 | MUMBAI |
| 10021 | RAM | TELEVISION | 2019-05-03 | PUNE |
(i) To display names of drivers and destination city where TELEVISION is being transported.
Ans: SELECT DRIVERNAME, DESTINATION FROM TRANSPORTER WHERE ITEM = “TELEVISION”;
(ii) To display driver names and destinations where destination is not MUMBAI.
Ans: SELECT DRIVERNAME, DESTINATION FROM TRANSPORTER WHERE DESTINATION <> “MUMBAI”;
(iii) To display the names of destination cities where items are being transported. There should be no duplicate values.
Ans: SELECT DISTINCT(DESTINATION) FROM TRANSPORTER;
(iv) To display details of rows that have some value in DRIVERGRADE column.
Ans: SELECT * FROM TRANSPORTER WHERE DRIVERGRADE IS NOT NULL;
(v) To display names of drivers, names of items and travel dates for those items that are being transported on or before 1st April 2019.
Ans: SELECT DRIVERNAME, ITEM, TRAVELDATE FROM TRANSPORTER WHERE TRAVELDATE <= “2019-04-01”;
(vi) To display the number of drivers who have ‘MOHAN’ anywhere in their names.
Ans: SELECT COUNT(*) FROM TRANSPORTER WHERE DRIVERNAME LIKE “%Mohan%”;
(vii) To display the names of drivers, item names and travel dates in alphabetic (ascending) order of driver names.
Ans: SELECT DRIVERNAME, ITEM, TRAVELDATE FROM TRANSPORTER ORDER BY DRIVERNAME;
(viii) To display names of drivers whose names are three characters long.
Ans: SELECT DRIVERNAME FROM TRANSPORTER WHERE DRIVERNAME LIKE “_ _ _”;
(ix) SELECT ITEM, COUNT() FROM TRANSPORTER GROUP BY ITEM HAVING COUNT() >1;
Ans:
| ITEM | COUNT(*) |
|---|---|
| TELEVISION | 3 |
| REFRIGERATOR | 2 |
(x) SELECT MAX(TRAVELDATE) FROM TRANSPORTER WHERE DRIVERGRADE = ‘A’;
Ans:
| MAX(TRAVELDATE) |
|---|
| 2019-04-19 |
Q6. (a) Mr. Sen has to create a table named ‘Employee’ with Columns to store EmpID, Name, Designation, Age and Salary. EmpID is the Primary key and Name cannot be NULL.
Some of the rows that will be inserted are shown below.
| Column name | Data type |
|---|---|
| Admission no | integer |
| Name | varchar |
| Marks1 | float |
| Marks2 | float |
Write SQL query to create the above table with appropriate data types and sizes of columns.
Ans: CREATE TABLE Employee(EmpID int PRIMARY KEY, Name varchar(20) NOT NULL, Designation varcharchar(20), Age int, Salary decimal(8,2));
OR
Ms. Rajshri is the Class Teacher of Class XII. She wants to create a table named ‘Student’ to store marks in different subjects of her class. Identify any 4 columns for the table along with their suitable data types.
Ans:
| Column name | Data type |
|---|---|
| Admission no | integer |
| Name | varchar |
| Marks1 | float |
| Marks2 | float |
(b) Consider the following tables PARTICIPANT and ACTIVITY and answer the questions that follow:
Table: PARTICIPANT
| ADMNO | NAME | HOUSE | ACTIVITYCODE |
|---|---|---|---|
| 6473 | Kapil Shah | Gandhi | A105 |
| 7134 | Joy Mathew | Bose | A101 |
| 8786 | Saba Arora | Gandhi | A102 |
| 6477 | Kapil Shah | Bose | A101 |
| 7658 | Faizal Ahmed | Bhagat | A104 |
Table: ACTIVITY
| ACTIVITYCODE | ACTIVITYNAME | POINTS |
|---|---|---|
| A101 | Running | 200 |
| A102 | Hopping bag | 300 |
| A103 | Skipping | 200 |
| A104 | Bean Bag | 250 |
| A105 | Obstacle | 350 |
When the table "PARTICIPANT" was first created, the column "NAME" was planned as the Primary key by the Programmer. Later a field ADMNO had to be set up as Primary key. Explain the reason.
Ans: Programmer had to change the primary key from Name to Admno because two participants can have same names (such as Kapil Shah) but both participants will not have same Admno.
OR
Identify data type and size to be used for column ACTIVITYCODE in table ACTIVITY.
Ans: Char is the data type for column ACTIVITYCODE and 4 is the size.
(c) With reference to the above given tables (in Q6 b), write commands in SQL for (i) to (iii).
(i) To display Activity Code along with number of participants participating in each activity (Activity Code wise) from the table Participant.
Ans: SELECT ACTIVITYCODE, COUNT(*) FROM PARTICPANT ORDER BY ACTIVITYCODE;
OR
How many rows will be there in Cartesian product of the two tables in consideration here?
Ans: 5*5 = 25 rows in the cartesian product.
(ii) To display Names of Participants, Activity Code, Activity Name in alphabetic ascending order of names of participants.
Ans: SELECT NAME, P.ACTIVITYCODE, ACTIVITYNAME FROM PARTICIPANT P, ACTIVITY A WHERE P.ACTIVITYCODE = A.ACTIVITYCODE ORDER BY NAME;
(iii) To display Names of Participants along with Activity Codes and Activity Names for only those participants who are taking part in Activities that have ‘bag’ in their Activity Names and Points of activity are above 250.
Ans: SELECT NAME, P.ACTIVITYCODE, ACIVITYNAME FROM PARTICIPANT P, ACTIVITY A WHERE P.ACTIVITYCODE = A.ACTIVITYCODE AND ACTIVITYNAME LIKE “%bag %” AND POINTS > 250;
Q7. (a) How does e-governance help in increasing Accountability (answerability of the Government to the people)? Write 2 points.
Ans: e-Governance helps in following ways:
(i) It provides transparency towards government policies, processes, progress.
(ii) It helps in reducing corruption as employee and consumer contact is reduced.
(b) Write 2 precautions to be followed while doing Online shopping.
Ans: Precautions to be followed while doing Online Shopping:
(i) Purchase from only secured and trusted websites.
(ii) Check for product details carefully and reviews of the website.
(c) Ms. Deepika of ABC School is creating a form for a Summer Camp application. Help her to choose the most appropriate controls from ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox, Label and Command Button for the following entries:
| S.No | Function |
|---|---|
| 1 | Let the user enter NAME of student |
| 2 | Let the user enter MOBILE NUMBER of student |
| 3 | Let the user choose one TSHIRT size out of the categories : XL / L / M / S |
| 4 | Let the user select Activities out of Rock Climbing / Mountain Biking / Zip Lining / Night Hike. More than one activity may be chosen. |
Ans: TextBox for Name of the student and Mobile number, RadioButton for selecting Tshirt size and CheckBox/ListBox for selecting Activities.

