Kerala Plus Two Computer Science Previous Year Question Paper Say 2018 with Answers
Board | SCERT |
Class | Plus Two |
Subject | Computer Science |
Category | Plus 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.
Part – A
Answer all questions from 1 to 5. Each carries 1 score. (5 × 1 = 5)
Question 1.
The ability of data to be processed in more than one form is called ________
Answer:
polymorphism
Question 2.
Each node in a linked list has a ________ to the next node.
Answer:
pointer
Question 3.
NORESIZE is an attribute of ________ tag.
Answer:
<frame>
Question 4.
In client-side scripting, processing is done by ________
Answer:
browser
Question 5.
VPS stands for ________
Answer:
Virtual Private Server
Answer any 9 questions from 6 to 16. Each carries 2 scores. (9 × 2 = 18)
Question 6.
What is the self-referential structure?
Answer:
Self Referential Structures: A structure contains an element that is a pointer to the same structure.
Eg:
struct date
{
int dd, mm, yyyy;
date *ptr;
};
Question 7.
What is the difference between the two declaration statements given below:
(a) int*ptr= new int(10);
(b) int*ptr = new int[10];
Answer:
(a) Dynamic initialization with value 10.
(b) Dynamic array of size 10.
Question 8.
Differentiate static and dynamic data structures. Give an example for each.
Answer:
The main memory can be allocated in two methods.
i) Static memory allocation
ii) Dynamic memory allocation
When the amount of memory to be allocated is known in advance and memory is allocated during compilation itself, it is referred to as static memory allocation.
int x=10;
When the amount of memory to be allocated is not known in advance and it is required to allocate memory as and when required during run time, it is known as dynamic memory allocation.
‘new’ operator is used for dynamic allocation of memory syntax.
datatype *pointer variable = new datatype;
eg: int *ptr=new int;
Question 9.
Categorize the following tags in HTM L appropriately.
<br>, <hl>, <img>, <table>
Answer:
Empty tag | container tag |
<br> | <h1> |
<img> | <table> |
Question 10.
Explain any two data types in JavaScript.
Answer:
Data types in JavaScript
Unlike C++ it uses only three basic data types
1. Number: Any number (whole or fractional) with or without sign.
Eg: +1977, -38.0003, -100, 3.14157, etc.
2. String: It is a combination of characters enclosed within double-quotes.
Eg: “BVM”, “[email protected]”, etc.
3. Boolean: We can store either true or false. It is case sensitive. That means can’t use TRUE OR FALSE.
Question 11.
Write the JavaScript code to display “Welcome to Kerala” inside the <hl>, tag as shown in the HTML page.
<HTML>
<Body>
<Script lang= “javascript”>
<hl> …………. </hl>
</Body>
</Script>
</HTML>
Answer:
document.write(“Welcome to Kerala”);
Question 12.
Explain any two components of DBMS.
Answer:
Components of DBMS
(a) Databases – It is the main component.
(b) Data Definition Language (DDL) – It is used to define the structure of a table.
(c) Data Manipulation Language (DML) – It is used to add, retrieve, modify and delete records in a database.
(d) Users – With the help of programs users interact with the DBMS.
Question 13.
Consider the following table:
S.No. | Name | Age | Total |
1. | Albert | 50 | 90 |
2. | Einstein | 60 | 95 |
3. | Kalam | 70 | 94 |
4. | Raman | 90 | 98 |
5. | Babbage | 95 | 99 |
(a) Identify the degree and cardinality of the given table.
(b) Identify a suitable primary key for the given table.
Answer:
(a) Degree 4
Cardinality 5
(b) SI. No is the primary key
Question 14.
Write the output of the following PHP code fragment.
function justA fun ($num)
{
$num = $num * 5 + ($num + 6);
return $num;
}
echo justA fun(100);
Answer:
5*100 + (100 + 6)
= 500 + 106
= 106
Hence the output is 606
Question 15.
Compare serial and parallel computing.
Answer:
Serial computing | Parallel computing |
A single processor is used | Multiple processors are used with shared memory |
A problem is divided into a series of instructions | A problem is divided into smaller ones that can be solved simultaneously |
Instructions executed sequentially | Instructions executed simultaneously |
One instruction is executed on a single processor at any moment | More than one instruction is executed on multiple processors at any moment of time. |
Question 16.
How does ICT help students in learning?
Answer:
Advantages of E-Learning:
- It can offer various courses to a large number of students from a distant locations.
- It saves journey time and money, instructor fees, etc.
- People can enjoy e-Learning at a lower cost
- It enables people to do courses conducted by national or international institutions.
Answer any 9 questions from 17 to 27. Each carries 3 scores. (9 × 3 = 27)
Question 17.
What is a Pointer in C++? Declare a pointer and initialize with the name of your country.
Answer:
Pointer is a variable which points to memory location of some other variable
Syntax:
data_type ‘variable;
#include<iostream>
using namespace std;
intmain()
{
char*ptr=newchar[10]; .
ptr=”India”;
cout<<ptr;
delete ptr;
}
Question 18.
What is Procedural Oriented Programming? What are the disadvantages of Procedural Oriented Programming?
Answer:
A program in procedural language consists of a list of instructions.
Following are the disadvantages of procedural language
a) Data is undervalued: Here the importance is on doing things rather than the data. The data has least importance. That is, data is exposed to all and there is a chance to access or destroy this data accidentally or intentionally by many functions on a program.
b) Adding new data requires modifications to all/many functions: A program may contain many functions and this functions may access different data used in different locations. If we add new data items, we will need to modify all the functions that access the data. This is a laborious task.
c) Creating new data types is difficult: In procedural languages, some built in data types such as int, float, double and character are available. Extensibility is the ability to create new data types without major rewriting of codes in its basic architecture. Some programming languages are extensible but procedural languages are not extensible.
d) Provides poor real-world modeling: Procedural programming paradigm treats data and functions are different not a single unit. In this Real-life simulations are not possible.
Question 19.
Write an algorithm to add a new item into a queue-.
Answer:
An algorithm is given below
Step 1: If front = 1 and rear=N or front=rear + 1
Then print “OVERFLOW” and return
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
Question 20.
List and explain any three attributes of the INPUT tag in HTML.
Answer:
<Input> It is used to create input controls. Its type of attribute determines the control type.
Main values of type attributes are given below.
- Text-To creates a text box.
- Password – To create a password text box.
- Checkbox – To create a check box.
- Radio – To create a radio button.
- Reset – To create a Reset button.
- Submit – To create a submit button.
- Button – To create a button
Question 21.
Consider a string “Gandhiji” Write JavaScript code fragment to do the following tasks:
(a) Convert the string to upper case.
(b) Find the length of the string.
(c) Display the 3rd letter in the string.
Answer:
(a) var x=”Gandhiji”;
alert(x.toUpperCase());
(b) var x=”Gandhiji”;
alert(“The number of characters is “+ x.length);
(c) var x=”Gandhiji”;
alert(x.charAt(2));
Question 22.
What is FTP client software? Differentiate FTP and SFTP.
Answer:
FTP (File Transfer Protocol) client software:
When a client requests a website by entering the website address. Then FTP client software helps to establish a connection between client computer and remote server computer. Unauthorised access is denied by using username and password hence secure our website files for that SSH (Secure Shell) FTP simply SFTP is used. Instead of http.//, it uses ftp.//:
By using FTP client s/w we can transfer(upload)the files from our computer to the web server by using the ‘drag and drop’ method. The popular FTP client software are FileZilla, CuteFTP, SmartFTP, etc.
Question 23.
List and explain different database users in DBMS.
Answer:
Users of Database
- Database Administrator – It is a person who has central control over the DBMS.
- Application Programmer – These are computer professionals who interact with the DBMS through programs.
- Naive users – He is an end-user. He does not know the details of DBMS.
Question 24.
Differentiate DELETE and DROP in SQL. Write the syntax of DELETE and DROP.
Answer:
Delete | Drop |
It is a DML command | It is a DDL command |
Used to delete rows in a TABLE | Used to delete the whole TABLE |
Here Table exists and we can insert rows | But here Table does not exist, so not possible to insert rows |
Syntax:
Delete from <Table Name> where condition;
DropTable <Table Name>;
Question 25.
Name the different types of arrays in PHP. Explain with an example.
Answer:
Arrays in PHP: In PHP array is a collection of key and value pairs. Unlike C++, in PHP we can use either nonnegative integers or strings as keys.
Different types of arrays in PHP
Indexed arrays
Associate arrays
Multidimensional 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. I n PHP the function array() is used to creating an array.
Syntax: $array_name=array(value1, value2, …….);
OR
$array_variable[key]=value;
Eg:$mark=array(60, 70, 80);
$course=array(“Science”, “Commerce”, “Humanities”);
Associative arrays: Arrays with named keys and string indices are called associative arrays.
Syntax:
$varibale_name=array(key1=>value1, key2=>value2,etc);
Eg:
$course=array (“Computer Science”=>”05”, “Commerce”=>”39”, “Science”=>”01”);
Question 26.
Discuss any three information security laws for protecting information shared over cyberspace.
Answer:
Guidelines for using computers over the internet
- Emails may contain Viruses so do not open any unwanted emails.
- Download files from reputed sources (sites).
- Avoid clicking on pop-up Advt.
- Most of the Viruses spread due to the use of USB drives so use cautiously.
- Use a firewall on your computer
- Use anti-virus and update regularly
- Use spam blocking software
- Take backups in regular time intervals
- Use strong passwords, i.e a mixture of characters (a-z & A-Z), numbers, and special characters.
- Do not use bad or rude language in social media and emails.
- Untick ‘Remember Me’ before login.
Question 27.
Briefly explain any three applications of computational intelligence.
Answer:
Computational Intelligence is the ability to make a computer to face and solve real-life problems just like an intelligent man do it. It includes Artificial Neural Networks (ANN), Evolutionary Computation (EC), Swarm Intelligence (SI), and Fuzzy Systems (FS).
A) Artificial Neural Networks (ANN): The brain is a complex, nonlinear and parallel computer with the ability to perform tasks such as recognise pattern, perception and motor control. ANN is the method of simulate biological neural systems to learn, memorise and generalize like human beings. A human brain cortex consists of 10-500 billion neurons with 60 trillion synapses(a synapse is a structure that permits a neuron to pass electrical).
B) Evolutionary Computation (EC): It is the simulation of the natural evolution, i.e. survival of the fittest. In the surrounding, we can see that the stronger must win and others.will lose. EC applied for data mining, fault diagnosis, classification, scheduling, etc.
C) Swarm Intelligence (SI): Swarm Intelligence is the study of behaviour of colonies or groups of social animals, birds, insects, ants, etc. How they communicate and create and manage their own colonies beautifully.
D) Fuzzy Systems: Human beings use common sense while facing a problem, justjike human beings fuzzy systems can also use common sense and behave like a human being. Fuzzy systems is used to control gear transmission and raking systems, control lifts, home appliances, controlling traffic signals etc.
Answer any 2 questions from 28 to 30. Each carries 5 scores. (2 × 5 = 10)
Question 28.
(a) Name and explain any two attributes of FORM tag. (2)
(b) Check the given HTML code. Fill the missing code to generate an output as shown in the figure. (3)
<HTML>
<body>
<form name= ‘loginForm’>
username:
<input type = “text”>
password:
………………………………
<input type = “………… ” value = “Login”>
………………………………
</form>
</body>
</html>
Answer:
a) <Form> attributes
1. Action – Here we give the name of the program (including the path) stored in the Webserver.
2. Method – There are 2 types of methods get and post.
3. Target – Specifies the target window for displaying the result. Values are given below.
_blank – Opens in a new window
_self – Opens in the same frame
_parent – Opens in the parent frameset
_top – Opens in the main browser window
name – Opens in the window with the specified name.
b) <inputtype=”password”>
<inputtype=”submit”>
<inputtype=”reset”>
Question 29.
(a) What are scripts in web programming? (2)
(b) Differentiate Client-side Scripting and Server-side Scripting. (3)
Answer:
a) Scripts are small programs embedded in the HTML pages, to write scripts <SCRIPT> tag is used.
Two types of scripts
1. Client scripts: These are scripts executed by the browser(client) hence reduces network traffic and workload on the server.
2. Server scripts: These are scripts executed by the server and the results as a webpage returned to the client browser.
b)
Client-Side Scripting | Server Side Scripting |
Script is copied to the client browser | Script is copied to the webserver |
Executed by the client | Executed by the server and result gets 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 depend on the type and version of the browser | It does not depend on the type and version of the browser |
Question 30.
Write SQL queries based on the table PRODUCT given below:
PID | Name | Product | Price |
P1 | Lukra | Seafood | 4000 |
P5 | Exotic Liquids | Mineral water | 7000 |
K1 | Tokyo Traders | Soft drink | 5000 |
R3 | Chang | Iron | 8000 |
W5 | Tokyo Traders | Soft drink | 3000 |
- Set PID as a primary key.
- Display the Name, Price of the product having the highest price.
- Change the Name of Supplier ‘Exotic Liquids’ to ‘Singapore Foods.’
- Delete all products of supplier ‘Tokyo Traders’.
- Display Pname and Supplier of all products in the ascending order of price.
Answer:
create table student(name varchar(20) primarykey, roll no int, marks int);
- Create table PRODUCT (PID varchar(2) primarykey, Name varchar(20), Product varchar(20), Price dec(8, 2));
- Select Name, Price from PRODUCT where Price=(Select max(Price) from PRODUCT);
- Update PRODUCT set Name=”Singapore Foods” where Name=”Exotic Liquids”;
- Delete from PRODUCT where-Name=”Tokyo Traders”;
- Select Name, Product from PRODUCT order by Price asc;