CBSE Class 12 IT Code 802 Sample Question Paper 2025 with Solution

Find CBSE and other IT Sample Papers for Class 12 – Code 802 with Complete Solution. Prepare for IT Code 802 Class 12 by Downloading PDF Sample Papers for Pre Board or Annual Exams and Understand the complete pattern of Board Exams for all Sessions. Here, ExamsMantra.in website is a one platform to get all Class 12 IT Code 802 Previous Year Question Papers and Solutions and more subject like computer science, Information Technology or Informatic Practices.

INFORMATION TECHNOLOGY (SUBJECT CODE – 402)

Pre Board / Annual Sample Question Paper for Class XII (Session 2024-25) by LearnCSE with Solution

Max. Time: 3 Hours
Max. Marks: 60

General Instructions:

  1. Please read the instructions carefully.
  2. This Question Paper consists of 24 questions in two sections: Section A & Section B.
  3. Section A has Objective type questions whereas Section B contains Subjective type questions.
  4. Out of the given (6 + 18 =) 24 questions, a candidate has to answer (6 + 11 =) 17 questions in the
    allotted (maximum) time of 3 hours.
  5. All questions of a particular section must be attempted in the correct order.
  6. SECTION A – OBJECTIVE TYPE QUESTIONS (30 MARKS):
    i. This section has 06 questions.
    ii. Marks allotted are mentioned against each question/part.
    iii. There is no negative marking.
    iv. Do as per the instructions given.
  7. SECTION B – SUBJECTIVE TYPE QUESTIONS (30 MARKS):
    i. This section has 18 questions.
    ii. A candidate has to do 11 questions.
    iii. Do as per the instructions given.
    iv. Marks allotted are mentioned against each question/part

SECTION A: OBJECTIVE TYPE QUESTIONS

Q. 1 Answer any 4 out of the given 6 questions on Employability Skills (1X4=4 marks)

(i) A _______ is the most basic type of sentence, its purpose is to relay information, and it is punctuated with a period.
a) Declarative sentences
b) Interrogative sentences
c) Imperative sentences
d) Exclamatory sentences

(ii) Which of the following are not true for Physiological motivation?
a) Physiological motivation is based on the physical needs to satisfy hunger or thirst.
b) Psychological motivations can be guided by need for achievement and need for affiliation.
c) Physiological motivation directs the behaviour towards satisfying specific bodily needs.
d) Physiological motivation are made up of emotional, behavioral and mental set of characteristics.

(iii) Samiara spends all her after-school hours practicing more and more sample question papers. She wants to do well in her exams so that she can get admission in her dream college in the city.
This is an example of:
a) Internal motivation
b) External motivation
c) Inspiration
d) Self-management

(iv) rearranges the range of cells but filtering only hides temporarily the rows/columns you do not want.
a) Charts
b) Built in functions
c) Sorting
d) Solve

(v) Dhruv had multiple factories in different states of India. On an unfortunate day one of his factory caught fire, and everything got burnt down. There was a huge financial loss, but luckily there was no threat to anyone’s life, and no injuries.
On the day of the fire, the workers of the factory had tried all possible ways to extinguish the fire, but to no avail.
The next day when Dhruv reached the factory, he got to know about the details from the Fire Brigade Incharge about the valour shown by the workers, without fearing for their lives to save the factory. Dhruv was moved on hearing the details.
He always had respect for loyalty. So that he did not lose the loyal workers that were working in the factory, he got them relocated to another factory of his, by the time the damaged factory of his was rebuilt, as it was insured.
a) Self Confidence
b) Effective Monitoring
c) Concern for Employees Welfare
d) Goal Setting

(vi) Individuals, who focus on developing solutions that benefit the society, are called _____.
a) Social Entrepreneurs
b) Industrial entrepreneurs
c) Agricultural entrepreneurs
d) Technical entrepreneurs

Q. 2 Answer any 5 out of the given 7 questions (1X5=5 marks)

(i) Which of the following is not an example of relational operator?
a) >
b) =
c) <
d) !=

(ii) How many primitive data types are supported by Java ? Name any two of them.
Ans: In all, Java supports eight primitive data types. (byte, short, int, long, float, double, char, boolean)

(iii) Which command will display all those names from a table which have the alphabet ‘a’ present anywhere in the Name column in a table Employee?
a) SELECT Name FROM Employee where Name in (“a”, “%a”);
b) SELECT Name FROM Employee where Name in (“a”, “%a”);
c) SELECT Name FROM Employee where Name in (“a”, “%a”);
d) SELECT Name FROM Employee where Name =”%a%”;

(iv) _____ is a set of attributes in a relation, for which no two tuples in a relation state have the same combination of values.
a) Superkey
b) Candidate Key
c) Primary Key
d) Candidate Key

(v) What is a method?
Ans: A method is a group of statements written to perform a specific task. The method body is enclosed within a pair of curly braces and contains the statements that the method will execute. Main is a special method that every Java application must have. When you run a program, the statements in the main method
are the first to be executed.

(vi) An application that can be accessed via a web browser, over a network connection is called a _____.
Ans: Web-based application

(vii) Complete the sentence:
The web-based online applications can be broadly categorized into
Ans: The web-based online applications can be broadly categorized into applications that require financial online transactions and applications that provide information and allow interaction via filling forms, posting query, viewing information, sending email or chatting.

Q. 3 Answer any 6 out of the given 7 questions (1X6=6 marks)

(i) Name the National Portal of India.
Ans: https://www.india.gov.in
(This is the National Portal of India, which provides a single window access to information and services being provided by the various Indian Government entities)

(ii) What are the two ways of writing comments in a Java program?
Ans: You can write comments in a Java program in the following two ways:
> Writing the comment between the symbols /* and */
> Beginning a comment line with two consecutive forward slashes (//)

(iii) Consider the table, Vehicle given below:
Identify the degree and cardinality of the table Vehicle.

MIDNAMEBRANDCAPACITYCOLOR
H101I20Hyundai5WHITE
M012XUV500Mahindra5BLUE
T107InnovaToyota7SILVER
H131VernaHyundai5BLUE
M010CelerioMaruti5RED
R100DusterRenault7WHITE
Table: VEHICLE

Ans: Degree- 5, Cardinality= 6

(iv) Internet transactions are susceptible to frauds. The combination of username and password is the most common method of user identification and authentication. List any one Some actions that can be taken to make the passwords safer.
Ans: Make a password complex, like mix case, use numbers and special characters. This decreases ability of automated attacks by trying different character combinations.

(v) Consider the following tables – ORDERS and PRODUCTS:

ORDERNODATEIDQTY
10012022-01-12P001180
10022022-12-31P002175
10032022-01-20P003125
10042022-12-25P004190
10052022-11-20P005155
10062022-11-15P006130
Table: ORDERS
IDPNAMEPRICE
P001PEN50
P002NOTEBOOK120
P003PENCIL20
Table : PRODUCTS
Ans: Primary Key is ORDERNO and Foreign key is ID

(vi) Which of the following ICT-enabled services have not been set up by the Indian Government?
a) Booking of railway tickets,
b) Registration of birth/death certificate
c) Purchase of movie tickets
d) RTI application submission
e) Registration of birth certificate

(vii) Find the invalid identifier from the following:
a) While
b) Score1
c) My_Name
d) break

Q. 4 Answer any 5 out of the given 6 questions (1X5=5 marks)

(i) Adrisa wanted to book her flight to attend an international conference on “Women and AI” . She needs to book her tickets using on online reservation system. Help her to follow the correct sequence of steps to do the same.
A. Make the payment
B. Open the online reservation website
C. Choose the dates of travel
D. Browse and search for the required information
a) B, D, C, A
b) A, B, C, D
c) A, D, C, B
d) B, A, D, C

(ii) The ______ aggregate function in SQL is used to find the average values of a numeric column :
a) AVERAGE()
b) MEAN()
c) AVG()
d) MID()

(iii) Which of the following is not true for Online Shopping?
a) The customer can view the goods that are displayed along with the details of the goods.
b) Once the goods are purchased they cannot be returned or exchanged.
c) The goods are then delivered at the address specified by the customer.
d) The customer can select the goods to be purchased and store them in their online shopping basket.

(iv) State TRUE or FALSE
Private data members of a class cannot be accessed outside the class however, you can give controlled access to data members outside the class through getter and setter methods.
Ans: TRUE

(v) Which of the following will display the highest and lowest value of the column Fee from the table COACH?
a) SELECT HIGH(FEE), LOW(FEE) FROM COACH;
b) SELECT HIGHEST(FEE), LOWEST(FEE) FROM COACH;
c) SELECT MAXIMUM(FEE), MINIMUM(FEE) FROM COACH;
d) SELECT MAX(FEE), MIN(FEE) FROM COACH;

(vi) Predict the output
System.out.println(444==8*8);
Ans: true

Q. 5 Answer any 5 out of the given 6 questions (1X5=5 marks)

(i) State True or False
Fixing of all the application bugs and fixing them is part of the Testing Phase of the project.
Ans: TRUE

(ii) Aparna wanted to remove the table PERSONAL permanently from the database SCHOOL. Write the command to help her do the same.
Ans: USE SCHOOL;
DROP TABLE PERSONAL;

(iii) A named constraints in a table can be easily deleted or updated using the _____ command.
Ans: ALTER TABLE

(iv) Differentiate between the following two java statements:
char Alpha=’A’ ; //Statement #1
String Name=”Manish”; //Statement #2
Ans: Statement #1: A variable of the primitive data type char can be used to store a single character. To assign a value to a char variable we enclose the character between single quotes.
Statement #2: To store more than one character, we use the String class in Java. To assign a text value to a String variable we enclose the text between double quotes.

(v) A special method member called the ______ method is used to initialize the data members of the class.
a) Variable
b) Constructor
c) Private
d) Package

(vi) A Java compiler instead of translating Java code to machine language code, translates it into ______.
Ans: Java Bytecode

Q. 6 Answer any 5 out of the given 6 questions (1X5=5 marks)

(i) Which of the following is an invalid variable declaration?
a) char Section=’A’;
b) String First_Name=”Arun”;
c) int Num==10;
d) double percentage = 87.6;

(ii) A _______ is an arithmetic operator that returns the remainder of division of values of operands.
Ans: % (modulus)

(iii) An application that can be accessed via a web browser, over a network connection is called a _____ application.
Ans: Web-based

(iv) Prerna wants to ensure that while data entry, the ADMNO field should not be left blank. Name the constraint that should be used.
Ans: Constraint NOT NULL should be used to ensure data entry in a field

(v) Which of the following command is used to retrieve information from a database?
a) INSERT
b) SELECT
c) UPDATE
d) CREATE

(vi) How does e-governance benefits its citizens?
Ans: E-governance empowers the citizens socially and economically, and enhances their lives by providing them with quality information and better services. It enables citizens to access information directly, without paying any money to a middleman or a tout. It ushers transparency in the system.

SECTION B: SUBJECTIVE TYPE QUESTIONS

Answer any 3 out of the given 5 questions on Employability Skills (2X3=6 marks)
Answer each question in 20–30 words.

7. List any two importance of self-motivation.
Ans: Helps in Achieving Goals – Self-motivation keeps you focused and driven toward your goals, ensuring consistent effort and progress.
Builds Confidence & Resilience – It boosts self-confidence and helps overcome challenges by maintaining a positive attitude and determination.

8. What is active listening? List any two factors that affect active listening.
Ans: Active listening is an art, which comprises both a desire to comprehend, as well as, offer support and empathy to the speaker. It can affect your job effectiveness, the quality of your relationship with others, and
hence, your overall well-being. Active listening allows you to understand the problems and collaborate to develop solutions.
The various factors that affect active listening are as follows:
(i) Eye contact (ii) Giving feedback

9. Do you think there are toxins in our environment? What is your view of toxins in our homes?
Ans: Well, yes, there are toxins present in our environment and environment including our homes also. Hence, the role of green jobs in our homes is to make them toxin free so that we have a healthy life. Toxins may be present in our homes in many ways such as – refrigerators releasing CFCs, cleaning and washing products, cosmetics, upholstery fabrics, rugs, mattresses, paint used on the walls, chemicals used to polish the floors, fragrances, some kind of clothes that uses chemicals, use of RO and Microwaves in our kitchens etc. So, in order to ensure that our homes are safe from toxins and healthy places to breathe, people with green collar jobs help us maintain a healthy environment.

10. What is sorting in a spreadsheet? Can data be sorted on more than one column?
Asn: Once you have entered data and applied relevant formulas in a worksheet, you can arrange the data in ascending or descending order. This is called sorting of data. Sorting on numerical and textual values is one of the main features of any spreadsheet software. Yes data can be sorted on more than one column that is called multi-level sorting.

11. Name any two Qualities of a successful entrepreneur.
Ans: The following are some of the qualities of a successful entrepreneur:
(i) Initiative – The ability to take proactive steps and act on new opportunities without waiting for direction.
(ii) Willingness to take risks – The courage to make bold decisions and invest in uncertain situations to achieve business success.

Answer any 4 out of the given 6 questions in 20–30 words each (2X4=8 marks)

12. Give the output of the following code segment-
int Num=4;
int Fact=1;
for (int i=1;i<=Num;i++)
{
Fact*=i;
System.out.println(Fact);
}

Ans: 1
2
6
24

13. Rajni is assigned the task to maintain the SQL database for PowerStock Ltd. She has created a table named STOCKDATA with the following structure:
Stock_id integer PRIMARY KEY
Symbol char(10)
Value integer(5)
Type char(10)
The table presently contains following data:

Stock_IdSymbolValueType
2624REL6653Sell
7660INFY3064Buy
4361NFY3117Buy
7292TC6865Buy
The company wants the attribute Value for the table to store values as real numbers with a precision upto 4 decimal places.

a) What SQL statement Rajni should write to make the desired change?
Ans: ALTER TABLE STOCKDATA MODIFY COLUMN (VALUE FLOAT);
b) What SQL statement will she write if all the values of the Value attribute in the existing table STOCKDATA are to be increased by 25%?
Ans: UPDATE STOCKDATA SET VALUE=VALUE*1.25;

14. Mention any two usages of a Database Management System in Education.
Ans: Usages of DBMS in Education are:
(i) For storing information about faculty and staff members.
(ii) For storing information such as student details, marks and result.

15. A school is making database of its teachers and students. Table TEACHER includes TeaCode, TName, TSubject, TDOJ, TDesig.
Give details of table STUDENT along with its schema.

Field NameData Type
AdmNoChar(5)
Namevarchar(30)
DOBDate
ContactNoint(10)
Classint(2)
Secchar(1)
Percentagedecimal(5,2)

16. Rewrite the following code after correcting the syntax errors, underline each correction made:
int number= = 1;
while (number <= 5);
{
System.out.print(“Square of ” + number);
System.out.println(” = ” , number*number);
Number+=1;
}

int number = 1;
while (number <= 5)
{
	System.out.print("Square of " +number);
	System.out.println(" = " +number*number);
	number+=1;
}

Answer any 2 out of the given 3 questions in 20–30 words each (3X2=6 marks)

17. Convert the following Java code from for loop to while loop without changing the logic.
int X=4,Y=3;
int Pow=1;
for (int i=1;i<=Y;i++)
Pow*=X;
System.out.println(Pow);

int X=4,Y=3;
int Pow=1;
int i=1;
while(i<=Y)
{
	Pow*=X;
	i++;
}
System.out.println(Pow);

18. a) Define Referential Integrity.
Ans: Referential integrity is a term used in database design to describe the relationship between two tables. Referential integrity is the logical dependency of a foreign key on a primary key.
b) Consider the following table TEACHER and answer the following questions:
Table: TEACHER

TIDTNAMEDOADEPTPAY
501SUBHAV JAIN2014-07-09COMPUTER450000
203SHUBH NANGIA2009-11-23CHEMISTRY340000
510VARUN KAPOOR2015-02-15HINDI320000
307KAMAL PATRA2010-12-29ACCOUNTS310000
490SUJAN REDDY2012-09-11ENGLISH270000
370IKAT GOSWAMY2011-05-08COMPUTER510000
DOA – Date of Appointment, DEPT – Department

Write the statements:
i) To display the number of teachers and the corresponding department name, in each department.

Ans: SELECT count(TNAME), DEPT FROM TEACHER GROUP BY DEPT;
ii) To display the minimum PAY of teachers whose Date of Appointment is after 2010.

Ans: SELECT min(PAY) FROM TEACHER WHERE DOA IS BETWEEN “2010-01-01” AND “2010-12-31”;

19. Differentiate between DROP and DELETE commands in SQL with appropriate examples.

Answer any 3 out of the given 5 questions in 50–80 words each (4X3=12 marks)

20. a) Give the output for the following code:
String myString = “Welcome to Java”;
System.out.println (myString.concat(“Session”));
System.out.println (myString.length());
System.out.println (myString.replace(“to”,”2″));

Ans: Welcome to Java Session
15
Welcome 2 Java

b.) Expand the term OOP.
Ans: Object Oriented Programming

21. a) Name any two educational websites that provide online courses for free, in collaboration with various universities across the globe.
Ans: coursera.org and edx.org provide high quality online courses for free, in collaboration with various universities across the globe
b) What is a project?
Ans: A project is a task that is undertaken to create a unique product, service, or result.
c) The process of development of web based applications is broadly categorized in four phases. List down the Phases in a Web Application Project.

Ans: The process of development of web based applications is broadly categorized in four phases. During the development process, one needs to follow the following four main phases of development:
i) Requirements Definition Phase
ii) Design Phase
iii) Implementation Phase
iv) Testing Phase

22. a. Consider the following co and answer the following questions:
static int MyMethod(int N)
{ return (N*N); }

public static void main(String[] args) { System.out.println(MyMethod(7)); }

i) Name the user defined method.
Ans: MyMethod
ii) What will be the output on executing the above code?
Ans: 49
b. What is exception handling in Java? Explain the terms try and catch in exception handling.
Ans: Java provides an exception handling mechanism so that a program is able to deal
with exceptions, and continue executing or terminate gracefully. The basic idea in
exception handling is to
Denote an exception block –
Identify areas in the code where errors can occur
Catch the exception – Receive the error information
Handle the exception – Take corrective action to recover from the error
Java provides the following keywords to handle an exception:
try –
A try block surrounds the part of the code that can generate exception(s).
catch – The catch blocks follow a try block. A catch block contains the exception handler – specific code that is executed when the exception occurs. Multiple catch blocks following a try block can handle different types of exceptions.

23. a) What are Arrays? Give an example.
Ans: Arrays are variables that can hold more than one value, they can hold a list of values of the same type.
One way to declare an array is :
marks = new double[5];

b) Write Java code to do the following:
i) Create an array Marks that stores values 78,65,85,91,82
Ans: double[] Marks = {78,65,85,91,82};
ii) To print all the values of the array Marks using a loop.
Ans:
for (int i = 0; i< 5; i++)
System.out.println(Marks[i]);

iii) Display the average stored in the array Marks.
Ans: System.out.println((Marks[0] + Marks[1]+ Marks[2]+ Marks[3] +Marks[4])/5);

24. Consider the following tables – TRAIN and PASSENGER

TIDTNAMEBoardingDestinationCost
305VandeBharatNew DelhiKatra2500
206ShatabdiMumbaiDelhi3500
307SuperfastLucknowChennai4500
208HolidayExpressGoaDelhi2000
Table: TRAIN
PIDTIDNameDOT
P108307Gagandeep Singh14-10-2022
P209206Rahat Ali01-01-2023
P110305Cristopher10-12-2022
P677208Diksha Luther11-09-2020
P555307Nira Kadam06-11-2020
P211208Ritam Ahuja17-12-2021
Table: PASSENGER

Write SQL queries for the following:
a) To display the count of passengers travelling by each train
Ans: Select count(Name),TName from Train, Passenger where Train.TID=Passenger.TID group by TName;
b) To add a new record in the table TRAIN: (12471, “Garib Rath”, “New Delhi”, “Mumbai”, 1105)
Ans: Insert into Train values (12471, “Garib Rath”, “New Delhi”, “Mumbai”, 1105);
c) To display TName, Name and Boarding of all passengers.
Ans: Select TName, Name, Boarding from Train, Passenger where Train.TID=Passenger.TID;
d) To display details of all trains whose cost is between 3000 and 5000.
Ans: Select * from Train where cost between 3000 and 5000;

Leave a Comment

© 2025 ExamsMantra.in All rights reserved.