Reviewing Kerala Syllabus Plus Two Computer Science Previous Year Question Papers and Answers Pdf March 2021 helps in understanding answer patterns.
Kerala Plus Two Computer Science Previous Year Question Paper March 2021
Time: 2 Hours
Total Score: 60 Marks
Answer any number of questions from 1 to 44. Maximum Score 60.
Question 1.
Questions from (a) to (e) carries 1 score each. (20 × 2 = 40)
a. Which keyword is used to define a structure in C++?
b. Which type of inheritance has one base class and two or more sub-classes?
c. Name the PHP operator to join two strings.
d. Name the application of computational intelligence that refers to metrics related to human characteristics and traits.
e. Give an example of Common Service Centre associated with e-Governance of Kerala.
Answer:
a) struct
b) Hierarchical inheritance
c) concatenation operator (∵)
d) biometrics
e) Akshaya Center
Answer from 2 to 21 carries 2 scores each. (20 × 2 = 40)
Question 2.
What is the use of structure data type in C++ programs?
Answer:
It is used to store elements of different data types. The keyword struct is used to define a structure.
Question 3.
Explain the reason for memory leak in programming.
Answer:
If the memory allocated using new operator is not de allocated using delete, that memory is left unused and not released for further allocation. This situation caused memory leak.
Question 4.
If int num = 5; write C++ statements to declare a pointer variable and store the address of num into it.
Answer:
int *n=#
![]()
Question 5.
Write any two features of Object Oriented Programming.
Answer:
- It allows modularity
- It allows data abstraction
- It allows code reusability
Question 6.
What is polymorphism in OOP? Which are the two classifications of it?
Answer:
Polymorphism is an essential feature of object oriented programming. Polymorphism means having many forms. It is the capability of an object to behave differently in response to a message or action. That is, the same operation is performed differently depending upon the type of data it is working with. Polymorphism is implemented in C++ in two ways, compile time polymorphism and runtime polymorphism.
Question 7.
What is the advantage of circular queue over linear queue?
Answer:
It is a linear data structure in which the operations are performed based on FIFO principle. Here insertion and deletion are easier and efficient utilization of memory.
Question 8.
Distinguish dynamic web page from static web page.
Answer:
| Static web pages | Dynamic web pages |
| Content and layout is fixed | Content and layout is changed frequently |
| Never use database | Data base is used |
| Run by browser | It runs on the server and result get back to the client(browser) |
| Easy to develop | Not at all easy |
Question 9.
Prepare a short note on Cascading Style Sheet.
Answer:
It is a style sheet language used for specifying common format like colour of the text, font, size, etc. other than the HML codes. That is CSS file used to separate HTML content from its style.
It can be written in 3 ways as follows
- Inline CSS In the body section of the HTML file
- Embedded CSS In the head section of the HTML file
- Linked CSS ;- A separate file(external file, eg. bvm.css) with extension .css and can be linked in the web page
Question 10.
Write any two attributes of <FONT>tag and their effects in the web page.
Answer:
Face – Used to specify the font face.
Color – Used to set the font color of text.
Size – Used to set the font size of the text.
Question 11.
Write the two tags associated with <DL> tag and the use of each in making a definition list.
Answer:
<DT> It is used to find the definition term
<DD> It is used to specify the description
![]()
Question 12.
What is hyper linking in a web page? Name the tag used for it.
Answer:
<A> tag is used for hyper links, these are used to connect two different web pages or different locations of same page.
Question 13.
What is the use of Action attribute in <FORM> tag?
Answer:
Action- Here we give the name of program(including the path) stored in the web server. This usually specifies a URL.
Question 14.
How will you declare a variable in JavaScript? Give an example.
Answer:
The keyword var is used to create a variable in JavaScript. Eg. var num;
Question 15.
Write a JavaScript code to display the numbers from 1 to 100.
Answer:
vari;
for(i=1;i<=100;i++)
document.write(i+” “);
Question 16.
Write any two limitations of free hosting.
Answer:
- Limited storage space
- Do not allow multimedia files.
Question 17.
What is the use of FTP client software? Give an example.
Answer:
It is used to transfer(upload) files from our computer to web server by using the ‘drag and drop’ method. The popular FTP client softwares are FileZilla, CuteFTP, SmartFTP, etc.
![]()
Question 18.
Which are the four components of DBMS?
Answer:
Hardware, Software, Data, Users and Procedures.
Question 19.
If a table has 10 rows and 5 columns, what will be its degree and cardinality?
Answer:
Cardinality is the number of rows, here it is 10 Degree is.the number of columns, here it is 5.
Question 20.
What is the advantage of using VARCHAR data type over CHAR data type in SQL?
Answer:
Both are used to store characters. CHAR is used for fixed number of characters while VARCHAR is used for variable length of characters. No memory wastage in VARCHAR method.
Question 21.
Write a short note on Infringement.
Answer:
Infringement (Violation)
Unauthorized copying or use of Intellectual property rights such as Patents, Copy rights and Trademarks
are called intellectual property Infringement(violation).
It is a punishable offence.
* Patent Infringement: It prevents others from the unauthorized or intentional copying or use of Patent without the permission of the creator. Piracy: It is the unauthorized copying, distribution and use of a creation without the permission of the creator. It is against the copy right act and fience the person committed deserve the punishment.
* Trademark Infringement: It prevents others from the unauthorized or intentional copying or use of Trademark without the permission of the creator.
* Copy right Infringement: It prevents others from the unauthorized or intentional copying or use of Copy right without the permission of the creator.
Questions from 22 to 41 carries 3 scores each. (20 × 3 = 60)
Question 22.
Compare the two types of memory allocations in C++.
Answer:
| Static memory allocation | Dynamic memory allocation |
| Memory requirement is known in advance | Memory requirement is not known in advance |
| Memory is allocated during compilation time | Memory is allocated during runtime |
| Memory cannot be freed | Memory can be freed when not required |
| Less efficient | More efficient |
Question 23.
Write an algorithm to perform PUSH operation in a stack.
Answer:
Start
- lf(TOS <N-1)Then
- TOS = TOS +1
- STACK[TOS] = VAL
- Else
- Print “Stack Overflow”
- End of If
Stop
Question 24.
Explain any three operations performed on data structures.
Answer:
Operations on data structures
a) Traversing: Accessing or visiting or reading all elements of a data structure is called Traversal.
b) Searching : Searching is the process of finding elements in a data structure
c) Inserting : It is the process of adding new data at particular location is called insertion.
![]()
Question 25.
What is the use of each of the following text format-ting tags in HTML?
(a) <STRONG>
(b) <SUP>
(c) <U>
Answer:
a) <STRONG> – To bold text
b) <SUP> – To make the text as a Superscript.
c) <U> – To make the text underline.
Question 26.
List any three features of web server.
Answer:
- Its storage capacity is high
- It is a high speed computer
- Its processing capacity is high.
- It has multiple processors.
- Always on and connected to a high bandwidth internet connection
Question 27.
How does client side scripting differ from server side scripting?
Answer:
Following are the differences.
| Client Side Scripting | Server Side Scripting |
| Script is copied to client browser | to the web server |
| Executed by the client | Executed by the server and result is get back to the browser window |
| Used for Client level validation | Connect to the database in the server |
| It is possible to block by the user | Cannot possible |
| Client side scripts depends the type and version of the browser | It does not depend the type and version of the browser |
Question 28.
Write HTML code to display the following list in a web page.
Higher Secondary Education
* Science group
* Humanities group
* Commerce group
Answer:
<html> <head> <title>List of Course</title> </head> <body bgcolor=”cyan”> <h1>Higher Secondary Education</h1> <UL> <LI>Science group</LI> <LI>Humanities group</LI> <LI>Commetce group</LI> </UL> </body> </html> .
Question 29.
List any three values provided to Type attribute of <INPUT> tag and specify the use of each.
Answer:
The ‘type’ attribute of <INPUT> tag is used to create different control. The main values of type attribute is given below.
- Text: Creates a single line Text Box.
Eg. <INPUT Type= “Text”> - Password: creates a password box in which characters are displayed by symbols like asterisk(*)
Eg. <INPUT Type=“Password”> - Check Box: Creates a check box.
Eg. <INPUT Type = “Check Box”> - Radio: Creates option button (Radio Button)
Eg. <INPUT Type= “Radio” Name=“sex” Value= “M”>Male - Reset: Creates reset button. It is used to clear all the data entered
Eg. <INPUT Type= “Reset” > - Submit: Creates a submit Button. When click on it data entered in the form will sent to web server.
Eg. INPUTType = “Submit”>
Question 30.
What is meant by nesting of <FRAMSET>? Explain its need.
Answer:
A<FRAMESET>tag contains another <FRAMESET> tag is called nesting. It is used to divide the Broser window more than one. Further division is possible by using nesting of this tag.
![]()
Question 31.
List three data types in JavaScript and give example for each.
Answer:
DATA TYPES IN JAVASCRIPT
Unlike C++ it uses only three basic data types
- Number: Any number(whole or fractional) with or without sign.
Eg: +1977,-38.0003,-100, 3.14157,etc - String: It is a combination of characters enclosed within double quotes.
Eg: “BVM”, “jobi_cg@rediffmail.com”, etc - Boolean : We can store either true or false.lt is case sensitive. That means can’t use TRUE OR FALSE
Question 32.
Explain the working of the following JavaScript functions and specify the output of each.
(a) isNaN(“254”)
(b) “Covid-19”.charAt(3)
(c) “MASK”.toUpperCase()
Answer:
(a) isNaN()- To check whether the given value is a number or not. If the value is a number then it return a false value.
isNaN(“254”)- It returns false.
(b) charAt()- It returns the character at a particular position.
“Covis-19”.charAt(3)- It returns “i”.
(c) toUpperCase() – This is used to convert the text to upper case.
“mask”.toUpperCase() – It returns MASK.
Question 33.
Prepare short notes on three types of web hosting.
Answer:
Types of web hosting: Various types of web hosting services are available. We can choose the web hosting services according to our needs depends upon the storage space needed for hosting, the number of visitors expected to visit, etc.
1) Shared Hosting : This type of hosting sharing resources, like memory , disk space and CPU hence the name shared. Several websites share the same server. This is suitable for small websites that have less traffic and it is not suitable for large websites that have large bandwidth, large storage space and have large volume of traffic.
Eg: Shared hosting is very similar to living in an Apartment(Villas) complex. All residents are in the same location and must share the available resources(Car parking area, Swimming pool, Gymnasium, play ground, etc) with every one.
2) Dedicated Hosting : A web server and its resources are exclusively for one website that have large volume of traffic means large volume of requests by th6 visitors. Some Govt, departments or large organizations require uninterrupted services for that round the clock power supply is needed. It is too expensive but it is more reliable and provide good service to the public.
Eg: It is similar to living in an Our own house. All the resources in your bouse is only for you. No one else’s account resides on the computer and would not be capable of tapping into your resources.
3) Virtual Private Server (VPS): A VPS is a virtual machine sold as a service by an Internet hosting Service. A VPS runs its own copy of an OS (Operating System) and customers have super level access to that OS instance, so they can install almost any s/w that runs on that OS. This type is suitable for websites that require more features than shared hosting but less features than dedicated hosting.
Eg: It is similar to owning a Condo
Question 34.
Explain three types of data abstractions in DBMS.
Answer:
Database Abstraction – Abstraction means hiding, it hides certain details of how data is stored and maintained.
Levels of Database Abstraction –
- Physical Level (Lowest Level) – It describes how the data is actually stored in the storage medium.
- Logical Level (Next Higher Level) – It describes what data are stored in the database.
- View Level (Highest level) – It is closest to the users. It is concerned with the way in which the individual users view the data.
Question 35.
List any three constraints used with CREATE TABLE command and specify the use of each.
Answer:
a) NOT NULL: it specifies that a column can never have null values, i.e., not empty
b) UNIQUE: it ensures that no two rows have same value in the specified column.
c) PRIMARY KEY: it declares a column or a set of columns as the primary key of the table. This constraint makes a column NOT NULL and UNIQUE.
d) DEFAULT: it sets a default value for a column when the user does not enter a value for that column.
e) Auto_increment: This constraint is used to perform auto_increment the values in a column. That is automatically generate serial numbers. Only one auto_ncrement column per table is allowed.
Question 36.
Explain the use of any three DML commands in SQL.
Answer:
DMLcommands(SUDI-Any3)
- Select -: Used to select or display rows from a table. The keyword from is used with this. The Where clause is used to specify the condition.
- Update -: Used to modify the records in a table, the keyword used is set.
- Delete -: Used to delete records in a table.
- Insert -: Used to insert new records into a table. The keyword used is into.
![]()
Question 37.
Briefly describe three optional clauses used with SELECT command in SQL.
Answer:
Distinct – It is used to select distinct data from a table.
Where – This clause is used to give a condition for selection
Between And – This is used to select records which satisfies a range of values.
Question 38.
Write the syntax of for loop in PHP and explain its working.
Answer:
for(initialization; test;update)
{
body;
}
First initialize the loop variable. Then it check the condition, if it is true then the body will be executed. After that the loop variable will be updated and again check the condition. This process will be continued until the condition becomes false.
Question 39.
Explain two types of arrays in PHP.
Answer:
Arrays in PHP
In PHP array is a collection of key and value pairs. Unlike C++, in PHP we can use either non negative integers or strings as keys.
Different types of arrays in PHP
- Indexed arrays
- Associate arrays
- Multi dimensional arrays.
Indexed arrays-: The elements in an array can be distinguished as first or second or third etc. by the indices and the index of the first element is zero. In PHP the function array() is used to create an array. Syntax: $array_name=array(value1 ,value2 );
OR
$array_variable[key]=value;
Eg:$mark=array(60,70,80);
$course=array(“Science”,’’Commerce”,’’Humanities”);.
OR
$mark[0]=60; $mark[1]=70; $mark[2]=80; $course=”Science”; $couree=”Commerce”; $course=”Humanities”; Eg: <!DOCTYPE HTML> <html lang=”en”> <head> <title> We are learning PHP </title> </head> > <body bgcolor=”cyan”> <?php $couree=array(“Science”, “Commerce”,"Humanities”); for($i=0;$i<3;$i++) echo $course[$i].’’,”; ?> </body> </html>

The function print_r can be used for printing an array.
Syntax: print_r(array_name);
Eg:
<!DOCTYPEHTML> <html lang=”en”> <head> <title> We are learning PHP </title> </head> <body bgcolor=”cyan”> <?php $ c o u r s e = a r r a y ( ‘ Science”, “Commerce”,"Humanities”); print_r($course); ?> </body> </html>

Question 40.
Write a brief note on three services of cloud computing.
Answer:
Cloud service models (3 major services)
1) Software as a Service (SaaS): A SaaS provider company provides more services on demand such as they allow to access both resources and applications.
Examples are Google Docs, Adobe creative cloud, Microsoft Office 365, Facebook.com etc.
2) Platform as a Service(PaaS): A PaaS provider company provides subscribers access to the components that they require to develop and operate applications over the Internet.
Example : LAMP platform(Lirtux,Apache Server,MySQL and PHP), ASP.NET, PHP and Python, Google’s App Engine, Microsoft Azure, Force.com, etc.
3) Infrastructure as a Service(laaS): It provides basic storage devices and computing capabilities as standardized services over the network. Example: Amazon Web Services, Joyent, AT&T, GoGrid etc.
![]()
Question 41.
Write any three advantages of e-Learning.
Answer:
Advantages of E Learning :
- It can offer variety courses to large number of students from distant location.
- It saves journey time and money, instructor fees, etc.
- People can enjoy e Learning with lower cost
- It enables people to do courses conducted by national or inter national institutions.
Questions from 42 to 44 carries 5 scores each. (3 × 5 = 15)
Question 42.
A web page is to be developed for Kerala Tourism.
(a) Write the basic structure of HTML program to design the page.
(b) Which attribute will be used to give green colour to the background.
(c) Write the HTML statement to insert an image file “kerala.jpeg”.
(d) Write the HTML statement to scroll the text “God’s own country.” (2 + 1 + 1 + 1 = 5)
Answer:
a) <html> <head> <title>Kerala Tourism</title> </head> i(1<body bgcolor=”cyan”> <h1 align=”centeiJ’><u>KeralaTourism</u></h1> <p> Kerala is blessed with beutiful destinations such as beaches, backwaters, hill stations etc. It is also known as God’s own Country. </p> <h3>Tourist Destinations</h3> <UL> <LI>Kovalam</LI> <LI>Munnar</LI> <LI>Thekkadi</LI> <LI>Kochi</LI> <LI>Vayanadu</LI> </UL> </body> </html>
b) <body bgcolor=”green”> or <body bgcolor=”#00FF00″>
c) <img src=”kerala.jpg” width=”400 “ height=”400″>
d) <marquee>God’s own country</marquee>
Question 43.
Write HTML code to create a table in a web page as shown below.
| 2021 | Science | Humanities | Commerce |
| Std. XI | 165 | 58 | 109 |
| Std. Xlt | 173 | 64 | 112 |
Answer:
<html> <head> <title>Simple Table</title> </head> <body bgcolor-’blue” text=”red”> <table border=”1"> <tr> <th>2021</th> <th>Science</th> <th>HumanitIes</th> <th >Commerce</th > </tr> <tr> <td>Std XI</td> <td>165</td> <td>58</td> <td>109</td> </tr> <tr> <td>Std XII</td> <td>173</td> <td >64 </td > <td>112</td> </tr> </table> </body> </html>
![]()
Question 44.
Observe the following tables DBMS.
Football
| PCode | PName | Class |
| 101 | Rahul | 12 C |
| 105 | John | 11 A |
| 107 | Noufal | 12 A |
Atheletics
| PCode | PName | Class |
| 103 | Renjith | 12 B |
| 105 | John | 11 A |
| 110 | Irfan | 12 A |
(a) Explain UNION operation with the help of the above two tables.
(b) What will be the result if INTERSECTION opera¬tion is performed on these tables?
(c) Which operation is to be performed to get the list of students in Football from class 12A? ( 2+ 2 + 1 = 5)
Answer:
a) UNION operation returns a relation containing all tuples appearing in either or both of two relations. The resulted relation is as follows.
| Pcode | Pname | Class |
| 101 | Rahul | 12C |
| 103 | Renjith | 12B |
| 105 | John | 11A |
| 107 | Noufal | 12A |
| 110 | Irfan | 12A |
b) INTERSECTION operation returns a relation of all tuples appearing in both of the two relations.
| Pcode | Pname | Class |
| 105 | John | 11A |
c) σClass=”12A”(Football)