Plus Two Computer Science Model Question Papers Paper 1

Kerala Plus Two Computer Science Model Question Papers Paper 1 with Answers

BoardSCERT
ClassPlus Two
SubjectComputer Science
CategoryPlus Two Previous Year Question Papers

Time: 2 Hours
Cool off time : 15 Minutes

General Instructions to candidates

  • There is a ‘cool off time’ of 15 minutes in addition to the writing time of 2 hrs.
  • Your are not allowed to write your answers nor to discuss anything with others during the ‘cool off time’.
  • Use the ‘cool off time’ to get familiar with the questions and to plan your answers.
  • Read questions carefully before you answering.
  • All questions are compulsory and only internal choice is allowed.
  • When you select a question, all the sub-questions must be answered from the same question itself.
  • Calculations, figures and graphs should be shown in the answer sheet itself.
  • Malayalam version of the questions is also provided.
  • Give equations wherever necessary.
  • Electronic devices except non-programmable calculators are not allowed in the Examination Hall.

Answer all questions from 1 to 5. Each carries 1 score. (5 × 1 = 5)

Question 1.
The blueprint or prototype that defines the properties and behaviour of similar objects is called ________
Answer:
class

Question 2.
Write an example of dynamic data structure.
Answer:
stack or queue or linked list

Question 3.
Which is the default port number of HTTP service?
Answer:
80

Question 4.
The attribute required in the <A> tag for internal linking is ________
Answer:
<a href=”#Top”>.
Here href is the attribute and # symbol is essential for internal linking.

Question 5.
SFTP stands for __________
Answer:
Secure Shell File Transfer Protocol

Answer any nine questions from 6 to 16 (2 scores each)

Question 6.
What are the differences between array and structure in C++?
Answer:

StructureArray
1. It is a user-defined data type1. Predefined data type
2. It is a collection of different types of logically related data under one name.2. Collection of data elements of same data type having a common name.
3. Elements referenced using dot operator(.)3. Elements reference using its subscripts (position value)
4. When an element of a structure becomes another structure nested structure and complex structures are formed4. When an elements of another becomes another array, multidimensional arrays are formed.
5. Structure contains array array as its elements.5. Array of structure can be formed.

Question 7.
How can you create a dynamic array of size N, if N is inputted by the user?
Answer:
int *ptr=new int[N];

Question 8.
What is the advantage of circular queue over linear queue?
Answer:
As the name implies logically the shape of the circularqueue is a shape of a circle, The linearqueue has some limitations such as some occasions the capacity of the linear queue cannot be used fully. The limitation of linear queue can overcome by circular queue. Circular queue is a queue in which the two end points are connected.

Question 9.
Differentiate alink and vlink attribute in body tag?
Answer:
ALINK – Specifies the colour of hyperlinks
VLINK – Specifies the color of hyperlinks which are already visited by the viewer.
Eg. < BODY ALINK= “Cyan” LINK-“Magenta” VLINK= “Orange”>

Question 10.
Correct the javascript code fragment given below to display the value entered in the text box.

<form Name =‘myform’>
<input a number <input type = “text” name =num>
<input type = “button” value = “check” ………>
</form>
function Myform()
{
num= ………;
alert(num);
}
Answer:
The correct code is as follows:
<html>
<head>
<Script Language=”JavaScript”>
function Myform()
{
var num;
num=document.myform.num.value;
alert(num);
}
</script>
</head>
<body>
<center>
<form name=”myform”>
input a number
<inputtype=”text” name=”num”>
<input type=”button” value=”check”
Click=”Myform()”>
</form>
</center>
</body>
</html>

Question 11.
Write any two mouse events in javascript and its description.
Answer:
1. onClick() – This event occurs when the user clicks on an object by using mouse
2. onMouseEnter() – This event occurs when the mouse pointer is moved onto an object.

Question 12.
Write short notes on primary key and foreign key.
Answer:
Primary key – It is a set of one or more attributes used to uniquely identify a row.
Foreign key – A single attribute or a set of attributes, which is a candidate key in another table is called foreign key.

Question 13.
Considerthe given table PRODUCT and answerthe following questions in relational algebra.
a) Select all details of product where quantity is above 60 (1 score)
b) Select Pname and Quantity (1 score)

PINPnameQuantityAmount
1Pen2040
2Pencil3080
3Eraser7090
4Sharpner90120

Answer:
a) σ Quantity > 60 (PRODUCT)
b) π Pname, Quantity (PRODUCT)

Question 14.
Why do we need a PHP script in Webpages? What type of output is generated when a PHP script is processed?
Answer:
Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source code hence it is less secure. On the other hand, PHP is executed on the server and the result is sent back to the client (browser) so it is impossible to view the source code.

Question 15.
What is e-banking? What are the areas where e-banking is effectively utilized?
Answer:
E-banking (Electronic Banking): Through electronic channels doing all the banking activities at any time and place through the internet. Through this one can transfer funds from our account to another account, hence one can pay bills such as telephone, electricity, purchase tickets(Flight, Train, Cinema, etc).

Question 16.
What is GIS?
Answer:
Geographical Information System: Geographic Information System(GIS) technology is developed from the digital cartography and Computer-Aided Design(CAD) database management system. GIS as the name implies capturing, storing for future reference, checking and displaying data related to various positions on the earth’s surface. GIS-can be applied in many areas such as soil mapping, agricultural mapping, forest mapping, e-Governance, etc.
GIS is used in development planning like strategic rural and urban planning, infrastructure planning, precision agriculture planning, etc.

Answer any nine questions from 17 to 27 (3 scores each)

Question 17.
a) What is nested structure? (1 score)
b) Consider the following structure definition
struct Student
{
int rno;
char Name [20];
char dob;
}

How can you implement the concept of nested structure using the member ‘dob’?
Answer:
If a structure declaration contains another structure as one of the members, it is called a nested structure.
struct date
{
short day, month, year;
};
struct Student
{
int rno;
charname[20];
date dob;
};

Question 18.
Explain any three concepts of object-oriented programming?
Answer:
Advantages of using OOP are

  1. OOP allows modularity(divide the large programs into smaller ones)
  2. It is good for defining abstract data types.
  3. It allows data abstraction. That is it hides or protects data.
  4. It allows code reusability
  5. Real-life entities can be easily created
  6. It supports to create new data types.

Question 19.
Write an algorithm to remove an item from a Queue?
Answer:
Step 1: If front = Null then print “UNDERFLOW” and return
Step 2: Set item = Queue[front]
Step 3: If front = rear then
Set front = Null and rear = Null
Else if front = N then set front = 1
Else
Set front = front +1
End if
Step 4: stop

Question 20.
List and explain any three attributes of TABLE tag in HTML
Answer:
<Table> Attributes (Any three)

  1. Border – It specifies the thickness of the borderlines.
  2. Border color – Colorful border lines.
  3. Align – Specifies the table alignment in the window.
  4. Bg-color – Specifies background colour.
  5. Cellspacing – Specifies space between table cells.
  6. Cellpadding – Specifies space between cell border and content.
  7. Cols – Specifies the number of columns in the table.
  8. Width – Specifies the table width.
  9. Frame – Specifies the border lines around the table.
  10. Rules – Specifies the rules (lines) and it overrides the border attribute.

Question 21.
What are the different ways to add javascript in a webpage?
Answer:
Ways to add scripts to a web page.
1) Inside <BODY> section
Scripts can be placed inside the <BODY> section.
2) Inside <HEAD> section
Scripts can be placed inside the <HEAD> section. This method is a widely accepted method
3) External (another) JavaScript file
We can write scripts in a file and save it as a separate file with the extension .js. The advantage is that this file can be used across multiple HTML files and can enhance the speed of page loading.

Question 22.
What is meant by web hosting? Briefly explain any two pages of web hosting?
Answer:
Web hosting
Buying or renting storage space to store website in a web server and provide service(made available 24×7) to all the computers connected to the Internet. This is called web hosting. Such service providing companies are called web hosts. Programming languages used are PHP, ASP.NET, JSP.NET, etc.

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, playground, etc) with everyone.

2. Dedicated Hosting: A web server and its resources are exclusively for one website that have large volume of traffic mean large volume of requests by the 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 provides good service to the public.
Eg: It is similar to living in an Our own house. All the resources in your house are 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 23.
Explain different level of data abstraction in DBMS?
Answer:
Levels of Database Abstraction
1. Physical Level (Lowest Level) – It describes how the data is actually stored in the storage medium.
2. Logical Level (Next Higher Level) – It describes what data are stored in the database.
3. 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 24.
Which constraints are used to define the following cases in SQL?
a) set a field to uniquely identify rows in a table.
b) increment the value of a field automatically.
c) set the value of a field to be not null
Answer:
a) Primary key
b) auto increment
c) not null

Question 25.
Consider the data given below
Data in first array: 12, 36, 29, 34, 48
Data in Second array: Pen = 35, Pencil = 40, Eraser = 5, Brush = 25.
a) Name the suitable types of arrays to store these data. (1 score)
b) Write the PHP code to create these arrays to store the data. (2 score)
Answer:
a) first array – Indexed array
second array – Associated array

b) i) $mark=array(12, 36, 29, 34, 48);
ii) $price=array(“Pen”=>”35″,”Pencil”=>”40″, “Eraser”=>”5”, “Brush”=>”25”);

Question 26.
What is meant by distributed computing? Discuss any two distributed computing Paradigms.
Answer:
Distributed computing is a method of computing in which large problems can be divided into smaller ones and this smaller ones are distributed among several computers. The solution for the smaller ones are computed separately and simultaneously. Finally the results are assembled to get the desired overall solution.

1. Parallel computing
In Serial computation the problem is divided into series of instructions and these instructions are executed sequentially, i.e. one after another. Here, only one instruction is executed at a time. But in parallel computing more than one instruction is executed simultaneously at a time.

2. Grid computing
It is a system in which millions of computers, smart phones, satellites, telescopes, cameras, sensors etc. are connected each other as a cyber world in which computational power (resources, services, data) is readily available like electric power. Any information at any time at any place can be made available in our finger tips. This is used in disaster management, weather forecasting, market forecasting, bio information etc.

Question 27.
What are the different types of interaction between stakeholders in e-Govemance?
Answer:
e-Govemance facilitates interaction between different stakeholders in governance
Government to Government(G2G): Electronically exchanging data or information among Government agencies, departments or organizations.
Government to Citizens(G2C): Exchange information between Government and Citizens Government to Business(G2B): Interaction between the Government and Business men.
Government to Employees(G2E): The exchange of information between Government and its employees

Answer any two questions from 28 to 30 (5 score each)

Question 28.
a) Why do we need dynamic webpage? Give an example.
b) What is the role ofwebservers?
c) Differentiate static webpage and dynamic webpage
Answer:
a) Some pages are displaying same content(same text, images,etc) every time. Its content are not changing. This type of web pages are called static page.Conventional wep pages display static pages and has some limitations.
Advanced tools are used to create web pages dynamic, that means pages are more attractive and interactive. For this JavaScript, VBScript, ASP, JSP, PHP, etc are used
b) A computer with high storage capacity, high speed and processing capabilities is called a web server. Hence it is a powerful computer with a server operating system and software for providing services like www, e-mail etc. Popular server operating systems are Redhat, openSUSE, Debian, Ubuntu, Sun Solaris, Microsoft Windows Server etc.
c)

Static web pagesDynamic web pages
Content and layout is fixedContent and layout is changed frequently
Never use database Run by browserData base is used It runs on the server and result get back to the client (browser)
Easy to developNot at all easy

Question 29.
a) What is the use of rowspan and colspan in a table in HTML?
b) Correct the given HTML code to get the output as shown in the figure

Science
Roll No.Name
1Arun
2Aliya

<html>
<body>
<table>
<tr>
<td align=’centre’>science</td>
</tr>
<tr>
<td>Rollno</td?
<td>name</td>
</tr>
<tr>
<td>1</td>
<td>Arun</td>
</tr>
</table>
</body>
</html>
Answer:
a) Colspan – Specifies the number of columns span for the cell.
Rowspan – Specifies the number of rows span for the cell.

b) <html>
<body>
<table border=”1″>
<tr>
<td colspan=”2″ align=”center”>Science</td>
</tr>
<tr>
<td>Rollno</td>
<td>name</td>
</tr>
<tr> <td>1</td>
<td>Arun</td>
</tr>
<tr>
<td>2</td>
<td>Aliya</td>
</tr>
</table>
</body
</html>

Question 30.
Write SQL queries based on the table EMPLOYEE given below.

EIDNameJob CodeSalary
1876SyamME345000
1114AbduFA532000
1556JohnTA139000
1354DhyanaTA150000
1130DhanamME342000

a) List EID and name of all employees
b) Find all employees with Job code TA1 and salary greater than 39000
c) Find all employees whose name begins with the letter D
d) Delete all employees with Job code ME3
e) Display the details of employees in ascending order of salary
Answer:
a) select EID, Name from EMPLOYEE;
b) Select * from EMPLOYEE where JobCode=’TA1′ and Salary>39000;
c) Select * from EMPLOYEE where Name like ‘D%’;
d) Delete from EMPLOYEE where JobCode=’ME3′;
e) Select * from EMPLOYEE order by Salary;

Plus Two Computer Science Previous Year Question Papers and Answers