The Directorate of General Education (DGE), Kerala, successfully conducted the DHSE Plus Two Computer Science Exam 2026 on March 7, 2026. To assist students in verifying their coding logic and technical answers, the complete Kerala Board Class 12 Computer Science Question Paper with Solution PDF is now available for download. 

The Plus Two Computer Science paper was designed to test students on advanced computing concepts, including C++ Programming, Data Structures, Web Technology, and Database Management Systems (DBMS)

  • Objective and Short Answer Sections: These focused on pointers, array operations, and fundamental networking protocols.
  • Programming and Logical Sections: Students were required to write efficient C++ code snippets, SQL queries for table manipulation, and HTML/JavaScript code for web page development.
  • Descriptive Section: Higher-weightage questions evaluated the understanding of object-oriented programming (OOP) principles and the architecture of the internet.

Kerala Board Class 12, 2026 Computer Science Question Paper with Solution PDF

Kerala Board Class 12, 2026 Computer Science Question Paper with Solution PDF Download PDF Check Solution
Kerala Board Class 12, 2026 Computer Science Question Paper with Solution

Question 1:

Which of the following data structures is used for storing key-value pairs in Python?

  • (A) List
  • (B) Dictionary
  • (C) Tuple
  • (D) Set
Correct Answer: (B) Dictionary
View Solution

Step 1: Understanding Python data structures.

In Python, a dictionary is a data structure that stores key-value pairs. Each key in a dictionary is unique and maps to a specific value.

Step 2: Evaluating the options.


(A) List: Incorrect. Lists are used to store ordered collections of items, but they do not store key-value pairs.
(B) Dictionary: Correct. Dictionaries are specifically used to store key-value pairs in Python.
(C) Tuple: Incorrect. Tuples are immutable sequences used to store collections of items, but they do not support key-value mapping.
(D) Set: Incorrect. Sets are unordered collections of unique elements, but they do not store key-value pairs.


Step 3: Conclusion.

The correct answer is (B) Dictionary, as it is used to store key-value pairs in Python.


Final Answer: Dictionary. Quick Tip: Dictionaries are a versatile data structure in Python, used to store data in a key-value pair format. Keys must be unique, and they map to specific values.


Question 2:

Which of the following functions is used to read input from the user in Python?

  • (A) get_input()
  • (B) input()
  • (C) read()
  • (D) scan()
Correct Answer: (B) input()
View Solution

Step 1: Understanding Python's input function.

In Python, the `input()` function is used to read input from the user. It waits for the user to enter a value, and the entered value is returned as a string.

Step 2: Evaluating the options.


(A) get_input(): Incorrect. There is no function called `get_input()` in Python for reading user input.
(B) input(): Correct. The `input()` function is used to read input from the user in Python.
(C) read(): Incorrect. The `read()` function is used to read content from a file, not from user input.
(D) scan(): Incorrect. `scan()` is not a built-in Python function for reading input.


Step 3: Conclusion.

The correct answer is (B) `input()`, as it is used to read user input in Python.


Final Answer: input(). Quick Tip: In Python, the `input()` function is used to read a string from the user. You can convert it to other types like integer or float using `int()` or `float()`.


Question 3:

Choose the indirection or value at operator used in C++ from the options given below.

  • (A) ++
  • (B) *
  • (C) &
  • (D) +
Correct Answer: (B) *
View Solution

Step 1: Understanding the operator in C++.

In C++, the indirection operator (also called the dereference operator) is represented by the asterisk (*) symbol. It is used to access the value stored at the memory address pointed to by a pointer.

Step 2: Evaluating the options.


(A) ++: Incorrect. The increment operator (++) is used to increase the value of a variable.
(B) *: Correct. The asterisk (*) is the dereference operator in C++, used to access the value at a pointer's address.
(C) &: Incorrect. The ampersand (&) is the address-of operator, used to get the memory address of a variable.
(D) +: Incorrect. The plus (+) operator is used for addition, not for indirection.


Step 3: Conclusion.

The correct answer is (B) *, as it is the indirection operator in C++.


Final Answer: *. Quick Tip: In C++, the asterisk (*) is used to dereference a pointer, while the ampersand (&) is used to obtain the address of a variable.


Question 4:

Legal right given to the creators for an original work is

  • (A) Geographical indication
  • (B) Trademark
  • (C) Copyright
  • (D) Industrial design
Correct Answer: (C) Copyright
View Solution

Step 1: Understanding the legal rights.

Copyright is the legal right given to the creators of an original work, including literature, art, music, and other creative expressions. It protects the creator's exclusive right to use, distribute, and reproduce their work.

Step 2: Explanation of the options.


(A) Geographical indication: Incorrect. Geographical indication refers to the right given to products that come from a specific geographical location and are associated with its origin.
(B) Trademark: Incorrect. A trademark protects symbols, names, or other distinctive marks that identify goods or services.
(C) Copyright: Correct. Copyright protects the creator's original work and grants them exclusive rights to use and reproduce it.
(D) Industrial design: Incorrect. Industrial design protects the visual appearance or aesthetic of a product, but not its creative work.


Step 3: Conclusion.

The correct answer is (C) Copyright, as it directly relates to the protection of original works created by the author or artist.


Final Answer: Copyright. Quick Tip: Copyright grants creators exclusive rights to their original work, preventing unauthorized use or reproduction of their work.


Question 5:

Which of the following is used for creating controls in a form in HTML?

  • (A) TABLE
    (B) OL
    (C) INPUT
    (D) FRAME
Correct Answer: (C) INPUT
View Solution

Step 1: Understanding the \ tag.

In HTML, the \ tag is used to create interactive controls in a form. This allows the user to enter data, such as text fields, checkboxes, radio buttons, and more.

Step 2: Evaluating the options.


(A) \: Incorrect. The \ tag is used to create tables in HTML, not form controls.
(B) \: Incorrect. The \ tag is used to create ordered lists in HTML, not form controls.
(C) \: Correct. The \ tag is used for creating various form controls in HTML.
(D) \: Incorrect. The \ tag is used for creating framesets in HTML, not form controls.


Step 3: Conclusion.

The correct answer is (C) \, as it is used to create form controls in HTML.


Final Answer: \. Quick Tip: In HTML, the \ tag is essential for creating interactive controls, such as text boxes, buttons, and checkboxes, within forms.


Question 6:

Which of the following is a valid data type in Python?

  • (A) integer
  • (B) float
  • (C) double
  • (D) complex
Correct Answer: (D) complex
View Solution

Step 1: Understanding Python data types.

In Python, valid data types include integer, float, and complex. However, Python does not use the data type "double"; instead, it uses "float" to represent floating-point numbers.

Step 2: Evaluating the options.


(A) integer: Correct. Integer is a valid data type in Python, used to represent whole numbers.
(B) float: Correct. Float is a valid data type in Python, used to represent floating-point numbers.
(C) double: Incorrect. Python does not have a "double" data type; it uses "float" for floating-point numbers.
(D) complex: Correct. Complex numbers are also a valid data type in Python, represented with a real and imaginary part (e.g., `3 + 4j`).


Step 3: Conclusion.

The correct answer is (D) complex, as it is a valid data type in Python.


Final Answer: complex. Quick Tip: In Python, the built-in data types include integers, floating-point numbers (float), complex numbers, and more. Double is not used in Python.


Question 7:

Which of the following is used to define a function in Python?

  • (A) def
  • (B) function
  • (C) func
  • (D) define
Correct Answer: (A) def
View Solution

Step 1: Understanding the Python syntax for defining a function.

In Python, the keyword `def` is used to define a function. The syntax is: \[ \texttt{def function\_name():} \]
This is followed by the function's code block.

Step 2: Evaluating the options.


(A) def: Correct. In Python, `def` is the keyword used to define functions.
(B) function: Incorrect. `function` is not a valid keyword in Python to define a function.
(C) func: Incorrect. `func` is not a Python keyword used for defining functions.
(D) define: Incorrect. `define` is not a valid keyword in Python to define a function.


Step 3: Conclusion.

The correct answer is (A) `def`, as it is the correct keyword used to define functions in Python.


Final Answer: def. Quick Tip: In Python, use the `def` keyword to define functions. This is followed by the function name and parameters.


Question 8:

What does the \texttt{break} statement do in a loop?

  • (1) Skips the current iteration
  • (2) Exits the loop
  • (3) Continues to the next iteration
  • (4) Stops the function
Correct Answer: (2) Exits the loop
View Solution

Step 1: Understanding the \texttt{break statement.

In Python, the \texttt{break statement is used to exit the loop entirely. When the \texttt{break statement is encountered, it terminates the loop, and the program continues to execute the code following the loop.

Step 2: Evaluating the options.


(1) Skips the current iteration: Incorrect. The \texttt{continue statement is used to skip the current iteration in a loop, not \texttt{break.
(2) Exits the loop: Correct. The \texttt{break statement exits the loop completely when encountered.
(3) Continues to the next iteration: Incorrect. The \texttt{continue statement is used for moving to the next iteration, not \texttt{break.
(4) Stops the function: Incorrect. The \texttt{break statement does not stop a function; it only exits a loop.


Step 3: Conclusion.

The correct answer is (2) Exits the loop, as that is the behavior of the \texttt{break statement.


Final Answer: Exits the loop. Quick Tip: The \texttt{break} statement is used in loops to terminate the loop immediately and continue execution after the loop.


Question 9:

Write any two advantages of using OOP.

Correct Answer:
View Solution




Step 1: Encapsulation.

OOP allows the bundling of data (attributes) and methods (functions) into a single unit known as a class. This helps in protecting the data from unauthorized access and modification, ensuring that only appropriate methods can manipulate the data.

Step 2: Inheritance.

OOP promotes reusability through inheritance, where a new class can inherit properties and methods from an existing class. This reduces redundancy and allows code to be reused, which makes the codebase more maintainable. Quick Tip: OOP allows the use of abstraction, inheritance, and polymorphism, which lead to more efficient and maintainable software development.


Question 10:

Name any four operations on data structures.

Correct Answer:
View Solution




Step 1: Insertion.

Insertion is the process of adding a new element to a data structure. It is an essential operation used in structures such as arrays, linked lists, stacks, and queues.

Step 2: Deletion.

Deletion refers to removing an element from a data structure. It helps in maintaining the integrity of the data structure and is an important operation in arrays, lists, and trees.

Step 3: Traversal.

Traversal is the process of visiting each element in the data structure. It is used to perform operations such as searching and displaying elements, and can be done in multiple ways (e.g., for arrays, linked lists).

Step 4: Searching.

Searching involves finding a specific element in a data structure. Common search operations include linear search and binary search, depending on the structure. Quick Tip: Common operations on data structures include insertion, deletion, traversal, and searching. These are fundamental for manipulating and accessing data.


Question 11:

Define the term data independence. What are the different levels of data independence?

Correct Answer:
View Solution




Step 1: Define Data Independence.

Data independence refers to the capacity to change the schema at one level of a database system without having to change the schema at the next higher level. It is a key feature of the relational database model, providing flexibility in data management and storage.

Step 2: Levels of Data Independence.

There are two main types of data independence:
- Physical Data Independence: This refers to the ability to change the physical storage of data without affecting the logical structure. For example, moving data from one storage device to another does not affect how the data is accessed by users.

- Logical Data Independence: This is the ability to change the logical schema without affecting the external schema or application programs. For example, adding new fields or changing the database structure should not affect how users interact with the data.
Quick Tip: Data independence is essential for database flexibility and scalability, allowing changes at the storage and schema level without disrupting application functionality.


Question 12:

Write any two advantages of parallel computing.

Correct Answer:
View Solution




Step 1: Define Parallel Computing.

Parallel computing involves breaking down a large problem into smaller tasks that can be processed simultaneously by multiple processors, improving computational efficiency and speed.

Step 2: Two Advantages of Parallel Computing.


(1) Faster Processing:

Parallel computing enables faster processing by dividing a task into smaller sub-tasks that can be executed concurrently, significantly reducing overall execution time.

(2) Efficient Use of Resources:

By using multiple processors, parallel computing can take advantage of unused or underutilized computational resources, optimizing performance and reducing bottlenecks. Quick Tip: Parallel computing increases efficiency and speed by allowing simultaneous execution of tasks, making it ideal for large-scale and complex computational problems.


Question 13:

Explain about the operations performed on stack data structure.

Correct Answer:
View Solution




Step 1: Push operation.

The push operation is used to insert an element onto the top of the stack. This operation increases the size of the stack by one and places the new element on top.

Step 2: Pop operation.

The pop operation is used to remove the top element from the stack. This operation decreases the size of the stack by one and removes the most recently added element.

Step 3: Peek or Top operation.

The peek operation is used to access the top element of the stack without removing it. This allows users to check the value at the top of the stack without modifying the stack.

Step 4: isEmpty operation.

The isEmpty operation checks whether the stack is empty or not. It returns true if the stack contains no elements, otherwise false.

Step 5: Size operation.

The size operation returns the number of elements present in the stack. It helps to keep track of the stack's current size. Quick Tip: Stacks are based on the Last-In-First-Out (LIFO) principle, where elements are added and removed from the top.


Question 14:

What is polymorphism? Write short notes about the types of polymorphism.

Correct Answer:
View Solution




Step 1: Define polymorphism.

Polymorphism is the ability of a single function, method, or operator to behave differently depending on the type or number of arguments. It is a core concept in object-oriented programming (OOP) that allows methods or functions to be used in multiple forms.

Step 2: Types of polymorphism.


(i) Compile-time polymorphism (Static polymorphism):

This type of polymorphism occurs when the method to be called is determined at compile time. Method overloading and operator overloading are examples of compile-time polymorphism.

(ii) Runtime polymorphism (Dynamic polymorphism):

This type of polymorphism occurs when the method to be called is determined at runtime. Method overriding is a common example of runtime polymorphism, where a method in the base class is overridden by a method in the derived class.

Step 3: Conclusion.

Polymorphism enhances flexibility and the reusability of code by allowing the same method to work in different ways based on the input or object type. Quick Tip: Polymorphism enables objects of different classes to be treated as objects of a common superclass, making the code more flexible and maintainable.


Question 15:

Briefly explain about any two column constraints used in SQL.

Correct Answer:
View Solution




Step 1: Define Column Constraints.

Column constraints are used to define the properties or rules applied to the columns in a database table to ensure the integrity and accuracy of the data. The constraints are applied at the column level.

Step 2: Explain the constraints.

Two common column constraints used in SQL are:

(1) NOT NULL:

This constraint ensures that a column cannot have a NULL value. It is used when we want to ensure that every row in the table must have a value for this column.

(2) UNIQUE:

The UNIQUE constraint ensures that all the values in a column are different from each other. It is used when we want to ensure that no duplicate values are entered in that column. Quick Tip: Column constraints are essential for maintaining data integrity and ensuring that only valid data is inserted into the table.


Question 16:

Describe about any two DML commands of SQL.

Correct Answer:
View Solution




Step 1: Define DML Commands.

DML (Data Manipulation Language) commands are used to manipulate and manage data in relational databases. These commands allow users to insert, update, and delete data from tables.

Step 2: Explain the DML commands.


(1) INSERT:

The INSERT command is used to add new rows of data to a table. For example: \[ INSERT INTO students (id, name, age) VALUES (1, 'John', 20); \]

(2) UPDATE:

The UPDATE command is used to modify existing data in a table. For example: \[ UPDATE students SET age = 21 WHERE id = 1; \] Quick Tip: DML commands help modify the data stored in a database, ensuring the records are up-to-date and accurate.

Class 12th Computer Science Most Important Questions with Solutions