Step-by-Step Textbook Solutions for Class 12 Computer Science
Review structured textbook solutions for Class 12 Computer Science . Built according to Kerala Board guidelines for the 2026-27 academic year, these downloadable answers support daily revision and problem-solving accuracy.
Download Textbook Solutions PDF
Navigate directly to the solved Computer Science textbook exercises using the digital viewer below. Each solution includes detailed step-by-step explanations, allowing students to instantly cross-check their work and identify areas requiring further revision.
Part A: Answer all questions from 1 to 5. Each carries 1 score.
Question 1: The wrapping up of data and functions into a single unit is called ______.
Answer:
Data encapsulation
Exam Tips:
a) Encapsulation binds data and the functions that work on it into one unit (a class), which also helps in data hiding.
Question 2: In a linked list, the link part of the last node contains ______ data.
Answer:
Null pointer
Exam Tips:
a) The null pointer marks the end of the list; this is how a traversal knows when to stop.
Question 3: Give the full form of VPS.
Answer:
Virtual Private Server
Exam Tips:
a) A VPS is a hosting type in which one physical server is divided into several virtual servers; learn the full forms of all hosting terms in this chapter.
Question 4: The number of rows in a relation is called ______.
Answer:
Cardinality
Exam Tips:
a) Do not confuse it with degree, which is the number of columns (attributes) in a relation.
Question 5: In PHP, arrays that use string keys are called ______.
Answer:
Associative arrays
Exam Tips:
a) Arrays with numeric keys are indexed arrays; arrays with string keys are associative arrays.
Part B: Answer any 9 questions from 6 to 16. Each carries 2 scores.
Question 6: Define a structure named 'Time' with elements hour, minute and second.
Answer:
struct Time
{
int hour, minute, second;
};
Exam Tips:
a) Start with the keyword struct, put the members inside braces and do not forget the semicolon after the closing brace.
b) Use the member names given in the question (hour, minute, second).
Question 7: Read the following C++ code:
int a[5] = {10, 15, 20, 25, 30};
int *p = a;
Write the output of the following statements:
(a) cout << *(p + 2);
(b) cout << *p + 3;
Answer:
(a) 20 (the third element, since p + 2 points to a[2])
(b) *p is 10 (the first element), so *p + 3 = 10 + 3 = 13.
Exam Tips:
a) *(p + 2) first moves the pointer and then reads the value, whereas *p + 3 first reads the value and then adds 3 to it.
b) Remember that the array name holds the address of the first element.
Question 8: List the different operations performed on data structures.
Answer:
The operations are traversing, searching, inserting (push), deleting (pop), sorting and merging.
Exam Tips:
a) List all six operations; for a stack or queue also mention the names push (insert) and pop (delete).
Question 9: Write the HTML tag for the following:
1. A hyperlink to the website http://www.dhsekerala.gov.in
2. An e-mail link to dhseexam@gmail.com
Answer:
1. <a href="http://www.dhsekerala.gov.in">DHSE Kerala</a>
2. <a href="mailto:dhseexam@gmail.com">Send mail</a>
Exam Tips:
a) Both links use the anchor tag with the href attribute; for e-mail the value must start with mailto:.
b) Add some link text and the closing </a> tag.
Question 10: Describe the use of the 'action' and 'method' attributes of the <FORM> tag.
Answer:
Attributes of the <FORM> tag:
1. Action: gives the name (with the path) of the program stored in the web server that will process the submitted data.
2. Method: there are two methods, GET and POST.
| GET method | POST method |
|---|---|
| Faster | Slower |
| Used to send a small volume of data | Used to send a large volume of data |
| Less secure | More secure |
| Data is visible during submission | Data is not visible during submission |
Exam Tips:
a) State the purpose of each attribute first, then give the GET and POST differences.
b) GET shows the data in the address bar, which is why it is less secure.
Question 11: Explain the two purposes of the '+' operator used in JavaScript.
Answer:
1. If both operands are numbers, '+' adds them. Example: 5 + 3 = 8.
2. If one of the operands is a string, '+' concatenates (joins) them. Example: "BVM" + 8172 gives "BVM8172".
Exam Tips:
a) Give one example for each purpose.
b) The type of the operands decides which action '+' performs.
Question 12: The JavaScript function given below is used to display the sum of digits of a given number. Fill in the blanks to complete the function.
<script language="JavaScript">
.......... sumdigit( )
{
var n, s;
n = document.frm.txt1. ..........;
for (s = 0; ..........; n = n/10)
s = s + ..........;
document.frm.txt2.value = s;
}
</script>
Answer:
function sumdigit( )
{
var n, s;
n = document.frm.txt1.value;
for (s = 0; n > 0; n = n/10)
s = s + n%10;
document.frm.txt2.value = s;
}
The blanks are: function, value, n > 0, n%10.
Exam Tips:
a) The text box content is read with the value property; the loop runs while n is greater than 0 and n%10 gives the last digit.
b) In real code use Math.floor(n/10) so that the number becomes an integer after each division.
Question 13: Explain any two constraints used in SQL.
Answer:
Constraints are used to ensure database integrity.
1. NOT NULL: ensures that a column can never have NULL values.
2. UNIQUE: ensures that no two rows have the same value in a column.
3. PRIMARY KEY: similar to unique, but it can be used only once in a table.
4. DEFAULT: sets a default value for a column.
5. AUTO_INCREMENT: automatically generates serial numbers for a column. Only one auto-increment column is allowed per table.
Exam Tips:
a) Two constraints with a clear explanation are enough for the 2 scores.
b) A primary key also cannot be NULL, which makes it stronger than UNIQUE.
Question 14: List the core data types in PHP.
Answer:
The data types are integer, float/double, boolean and string.
Exam Tips:
a) Write each type on its own so that the examiner can count them easily.
Question 15: What is meant by GIS? Give an example.
Answer:
Geographic Information System (GIS) technology has developed from digital cartography and computer-aided design (CAD) database management systems. As the name implies, GIS is used for capturing, storing, checking and displaying data related to various positions on the earth's surface.
Examples: GIS is applied in areas such as soil mapping, agricultural mapping, forest mapping and e-governance.
Exam Tips:
a) Expand GIS, define it in one sentence and give at least one application as the example.
Question 16: Define infringement.
Answer:
Infringement (violation) is the unauthorised copying or use of intellectual property rights such as patents, copyrights and trademarks. It is a punishable offence.
Types: patent infringement, trademark infringement and copyright infringement.
Exam Tips:
a) Mention the three types of intellectual property that can be infringed.
b) Add that it is a punishable offence.
Part C: Answer any 9 questions from 17 to 27. Each carries 3 scores.
Question 17: What are the different memory allocations used in C++? Explain.
Answer:
Main memory can be allocated in two ways:
1. Static memory allocation
2. Dynamic memory allocation
When the amount of memory to be allocated is known in advance and the memory is allocated during compilation itself, it is called static memory allocation.
When the amount of memory is not known in advance and it has to be allocated as and when required during run time, it is called dynamic memory allocation.
The 'new' operator is used for dynamic memory allocation.
Syntax: datatype *pointer_variable = new datatype;
Example: int *ptr = new int;
Exam Tips:
a) Name both types, explain each in a line and give the syntax or example of the new operator.
b) Mention that dynamically allocated memory is freed with the delete operator.
Question 18: What is polymorphism? Give an example.
Answer:
Polymorphism is the ability of a message or data to be processed in more than one form. It is achieved through function overloading, operator overloading and dynamic binding. There are two types.
a) Compile time (early binding / static) polymorphism: the compiler relates or binds a function call with the function definition during compilation itself. Examples are function overloading and operator overloading.
Function overloading: functions with the same name but different signatures (different number or types of parameters).
Operator overloading: gives a new meaning to an existing C++ operator. Example: '+' normally adds two numbers, but with operator overloading it can join two strings into one string.
b) Run time (late binding / dynamic) polymorphism: the function call is bound to the function definition during run time. It uses the concepts of pointers and inheritance.
Exam Tips:
a) Define polymorphism, name the two types and give one clear example such as the '+' operator.
b) Remember: compile time means early binding; run time means late binding.
Question 19: Write an algorithm to insert a new item into a queue.
Answer:
Step 1: If (front = 1 and rear = N) or (front = rear + 1), then print "OVERFLOW" and stop.
Step 2: If front = NULL, then set front = 1 and rear = 1
Else if rear = N, then set rear = 1
Else set rear = rear + 1
End if
Step 3: Set Queue[rear] = item
Step 4: Stop
Exam Tips:
a) Check the overflow condition first, then handle the empty queue, wrap-around and the normal case.
b) Write the algorithm as numbered steps and end with Stop.
Question 20: Differentiate between a static web page and a dynamic web page.
Answer:
| Static web page | Dynamic web page |
|---|---|
| Content and layout are fixed | Content and layout change frequently |
| Does not use a database | Uses a database |
| Run by the browser | Runs on the server and the result is sent back to the client (browser) |
| Easy to develop | Not easy to develop |
Exam Tips:
a) Give at least three points in a two-column table, with one point per row.
b) Mention the role of the web server for dynamic pages.
Question 21: Briefly explain the different ways in which JavaScript code can be inserted into a web page.
Answer:
Ways to add scripts to a web page:
1. Inside the <BODY> section: scripts can be placed inside the body section.
2. Inside the <HEAD> section: scripts can be placed inside the head section. This is the most widely accepted method.
3. External JavaScript file: scripts can be written in a separate file saved with the extension .js. The advantage is that the file can be used across many HTML files and it can improve the loading speed of the pages.
Exam Tips:
a) Give all three ways with one line of explanation each.
b) For the external file, mention the .js extension and its reuse.
Question 22: Distinguish between shared hosting and dedicated hosting.
Answer:
1. Shared hosting: Resources such as memory, disk space and CPU are shared, hence the name. Several websites share the same server. It is suitable for small websites with less traffic, and not suitable for large websites that need large bandwidth, storage and traffic handling.
Example: It is like living in an apartment complex, where all residents share the available facilities (parking area, swimming pool, gymnasium, playground, etc.).
2. Dedicated hosting: A web server and its resources are used exclusively by one website that has a large volume of traffic, that is, a large number of visitor requests. Government departments or large organisations that need uninterrupted service round the clock use it. It is expensive but more reliable and provides good service to the public.
Example: It is like living in your own house. All the resources of the house are only for you, and no one else can use them.
Exam Tips:
a) Compare cost, performance, reliability and suitability so that the difference is clear.
b) The apartment versus own-house example makes the answer easy to remember.
Question 23: Explain the different levels of data abstraction in a DBMS.
Answer:
Abstraction means hiding. Database abstraction hides certain details of how data is stored and maintained. The levels are:
1. Physical level (lowest level): describes how the data is actually stored in the storage medium.
2. Logical level (next higher level): describes what data are stored in the database.
3. View level (highest level): closest to the users. It is concerned with the way in which individual users view the data.
Exam Tips:
a) Write the levels from lowest to highest and say what each describes.
b) Remember: physical is "how", logical is "what", view is "user's view".
Question 24: Describe the 'union' and 'intersection' operations in relational algebra with suitable examples.
Answer:
Union (\(\cup\)): gives all tuples that appear in either or both of the two relations. The two relations must have the same attributes.
Intersection (\(\cap\)): gives all tuples that appear in both relations.
Example: Let relation A contain the names {Anu, Binu, Cathy} and relation B contain the names {Binu, Cathy, Dev}.
A \(\cup\) B = {Anu, Binu, Cathy, Dev}
A \(\cap\) B = {Binu, Cathy}
Exam Tips:
a) The two relations must be union compatible (same number and type of attributes).
b) Duplicate tuples appear only once in the result of a union.
Question 25: Write PHP code to display all even numbers below 100.
Answer:
<?php
echo "All even numbers below 100";
echo "<br>=================";
for ($i = 2; $i < 100; $i = $i + 2)
echo "<br>" . $i;
?>
Exam Tips:
a) PHP code starts with <?php and ends with ?>, and every variable begins with a dollar sign.
b) Start at 2 and add 2 each time; the dot (.) joins the line break and the number.
Question 26: Explain the cloud service models.
Answer:
There are three major cloud service models:
1. Software as a Service (SaaS): The provider offers software services on demand and allows users to access both resources and applications. Examples: Google Docs, Adobe Creative Cloud, Microsoft Office 365.
2. Platform as a Service (PaaS): The provider gives subscribers access to the components they need to develop and run applications over the Internet. Examples: LAMP platform (Linux, Apache server, MySQL and PHP), ASP.NET, Python, Google App Engine, Microsoft Azure.
3. Infrastructure as a Service (IaaS): Provides basic storage devices and computing capabilities as standardised services over the network. Examples: Amazon Web Services, Joyent, AT&T, GoGrid.
Exam Tips:
a) Give the full names of SaaS, PaaS and IaaS with one example each.
b) Remember the order: software for users, platform for developers, infrastructure for hardware resources.
Question 27: List and explain any three e-learning tools.
Answer:
a) Electronic book reader (e-books): Using a tablet, portable computer or any other device with suitable software, we can read digital book files.
b) e-text: The electronic format of textual data.
c) Online chat: Real-time exchange of text, audio or video messages between two or more people over the Internet.
d) e-content: Data or information such as text, audio, video, presentations, images and animations stored in electronic format.
e) Educational TV channels: TV channels dedicated only to e-learning. Example: VICTERS (Versatile ICT Enabled Resources for Students).
Exam Tips:
a) Only three tools are needed; choose the ones you can explain best, each with a one-line description.
b) Give an example where possible, such as VICTERS for educational TV channels.
Part D: Answer any 2 questions from 28 to 30. Each carries 5 scores.
Question 28: Explain the various attributes of the <BODY> tag.
Answer:
Attributes of the <BODY> tag:
1. BGCOLOR: specifies the background colour of the document body. Example: <BODY BGCOLOR="RED">
2. BACKGROUND: sets an image as the background of the document body. Example: <BODY BACKGROUND="result.jpg">
3. TEXT: specifies the colour of the text content of the page. Example: <BODY TEXT="Red">
4. LINK: specifies the colour of the hyperlinks that have not been visited by the user.
5. ALINK: specifies the colour of the active hyperlink (the link at the moment it is clicked).
6. VLINK: specifies the colour of the hyperlinks that have already been visited by the viewer.
Example: <BODY ALINK="Cyan" LINK="Magenta" VLINK="Orange">
7. LEFTMARGIN and RIGHTMARGIN: set the margin from the left and the right of the document window.
Exam Tips:
a) List each attribute with its purpose and a small example; five points are needed for 5 scores.
b) Do not mix up LINK (unvisited), ALINK (active) and VLINK (visited).
c) Colour values may be written as names or as hexadecimal codes.
Question 29: Write HTML code to display the following table in a web page:
Result of ABC school
| Year | Students | Pass Percentage | |
|---|---|---|---|
| Registered | Passed | ||
| 2014 | 200 | 130 | 65 |
| 2015 | 200 | 150 | 75 |
| 2016 | 200 | 160 | 80 |
Answer:
<html>
<head>
<title>Table</title>
</head>
<body bgcolor="cyan">
<h1 align="center">Result of ABC school</h1>
<table border="1" align="center">
<tr align="center">
<th rowspan="2">Year</th>
<th colspan="2">Students</th>
<th rowspan="2">Pass<br>Percentage</th>
</tr>
<tr align="center">
<th>Registered</th>
<th>Passed</th>
</tr>
<tr align="center">
<td>2014</td><td>200</td><td>130</td><td>65</td>
</tr>
<tr align="center">
<td>2015</td><td>200</td><td>150</td><td>75</td>
</tr>
<tr align="center">
<td>2016</td><td>200</td><td>160</td><td>80</td>
</tr>
</table>
</body>
</html>
Exam Tips:
a) Use rowspan="2" for the Year and Pass Percentage cells and colspan="2" for the Students heading.
b) Close every tag, and put a space between the tag name and its attributes.
c) Use straight quotes around attribute values.
Question 30: A table named 'student' with fields Roll_no, Name, Batch, Mark and Grade is given. Write SQL statements for the following:
1. To display the details of all students in the 'Science' batch.
2. To display the details of the students having grade A or A+.
3. To count the number of students in each batch.
4. To change the grade of the student whose Roll_no is 50 to A+.
5. To remove the details of the student whose Roll_no is 10.
Answer:
1. SELECT * FROM student WHERE Batch = 'Science';
2. SELECT * FROM student WHERE Grade IN ('A', 'A+');
3. SELECT Batch, COUNT(*) FROM student GROUP BY Batch;
4. UPDATE student SET Grade = 'A+' WHERE Roll_no = 50;
5. DELETE FROM student WHERE Roll_no = 10;
Exam Tips:
a) Text values go inside quotes and every SQL statement ends with a semicolon.
b) Use GROUP BY with COUNT(*) to count rows per group.
c) UPDATE and DELETE need a WHERE clause; without it all rows are changed or removed.
Free study material for Computer Science
Kerala Board Solutions for Class 12 Computer Science
Accessing Solutions
Access structured Kerala Board textbook solutions. Designed in alignment with the latest academic curriculum for Class 12 Computer Science, these answers cover all end-of-chapter exercises to support daily learning and homework completion.
Concept-Driven Answers for Class 12 Computer Science
Beyond providing final answers, these guides offer step-by-step breakdowns for complex queries in the Class 12 Computer Science module. This approach helps students balance theoretical depth with practical problem-solving skills required for Kerala Board exams.
Maximizing Study Efficiency
Consistent practice with these solution guides cultivates faster problem-solving habits and clearer logical structuring. For a complete preparation experience, pair these textbook answers with our dedicated revision notes and sample papers for Class 12 Computer Science.
FAQs
The complete and updated Kerala Plus Two Computer Science Previous Year Question Paper March 2019 with Answers is available for free on StudiesToday.com. These solutions for Class 12 Computer Science are as per latest Kerala Board curriculum.
Yes, our experts have revised the Kerala Plus Two Computer Science Previous Year Question Paper March 2019 with Answers as per 2026 exam pattern. All textbook exercises have been solved and have added explanation about how the Computer Science concepts are applied in case-study and assertion-reasoning questions.
Toppers recommend using Kerala Board language because Kerala Board marking schemes are strictly based on textbook definitions. Our Kerala Plus Two Computer Science Previous Year Question Paper March 2019 with Answers will help students to get full marks in the theory paper.
Yes, we provide bilingual support for Class 12 Computer Science. You can access Kerala Plus Two Computer Science Previous Year Question Paper March 2019 with Answers in both English and Hindi medium.
Yes, you can download the entire Kerala Plus Two Computer Science Previous Year Question Paper March 2019 with Answers in printable PDF format for offline study on any device.