Plus One Computer Science Previous Year Question Paper March 2018

Kerala Plus One Computer Science Previous Year Question Paper March 2018 with Answers

BoardSCERT
ClassPlus One
SubjectComputer Science
CategoryPlus One Previous Year Question Papers

Time Allowed: 2 hours
Cool off time: 15 Minutes
Maximum Marks: 60

General Instructions to Candidates:

  • There is a ‘cool off time’ of 15 minutes in addition to the writing time of 2 hours.
  • Use the ‘cool off time’ to get familiar with the questions and to plan your answers.
  • Read questions carefully before you answering.
  • Read the instructions carefully.
  • 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 question numbers 1 to 5. Each carries one score. (5 × 1 = 5)

Question 1.
What is the base of Mayan Number System?
Answer:
Base 20

Question 2.
Name any two preprocessor directives in C++.
Answer:
#include, #define, #undef

Question 3.
Which statement in C++ can transfer control of a program to a labelled statement?
Answer:
goto

Question 4.
Which character is used to delimit the string in memory?
Answer:
\0 or null character

Question 5.
An electronic device used for communication between computers through telephone line is …………..
Answer:
Modem

Answer any nine from question numbers 6 to 16. Each carries two scores. (9 × 2 = 18)

Question 6.
Draw the block diagram of John Von Neumann’s computer architecture.
Answer:
Plus One Computer Science Previous Year Question Paper March 2018, 1

Question 7.
List any four image file formats.
Answer:
Image file formats are bmp, tiff, png, jpeg/jpg, gif

Question 8.
What is cache memory?
Answer:
Cache Memory: The processor is a very high speed memory but comparatively RAM is slower than Processor. So there is a speed mismatch between the RAM and Processor, to resolve this a high speed memory is placed in between these two this memory is called cache memory. Commonly used cache memories are Level(L1) Cache(128 KB), L2(1 MB), L3(8 MB), L4(128 MB).

Question 9.
Draw a flow chart to find the area of a rectangle?
Answer:
Plus One Computer Science Previous Year Question Paper March 2018, 2

Question 10.
What are the different types of characters in the character set of C++?
Answer:
Plus One Computer Science Previous Year Question Paper March 2018, 3

Question 11.
Classify data types used in C++
Answer:
Character set:- To study a language first we have to familiarize the character set. For example to study English language first we have to study the alphabets. Similarly here the character set includes letters(A to Z & a to z), digits(0 to 9), special characters(+,-,?,*,/,……..) white spaces(non printable) etc..

Question 12.
How many bytes are required to store the following arrays?
int a [2] [5];
int b [25};
Answer:
In Geany, 4 bytes are needed for integer
so int a[2][5] requires 4*2*5=40 Bytes
int b[25] requires 4*25 = 100 Bytes.
In Turbo C++, 2 bytes are needed for integer
so int a[2][5] requires 2*2*5 = 20 Bytes
int b[25] requires 2*25 = 50 Bytes.

Question 13.
Distinguish the memory allocation of the following initialization statements?
char name [10] = “TOM”;
char str [ ]= “TOM”;
Answer:
char name[10] = “TOM”;
Here operating system allocates 10 bytes for the variable ‘name’ but it uses 4 bytes(1 byte for \0 or null character) and the remaining 6 bytes are waste charstr[ ] = “TOM”;

Here operating system allocates the sufficient memory i.e., only 4 bytes(3 bytes for TOM and 1 byte for null character) for the variable ‘str’. Hence there is no wastage of memory in this type of declaration.

NOTE:
The following program illustrates this.
#include<iostream>
using namespace std;
int main()
{
char name[10] = “TOM”;
char str[ ] = “TOM”;
cout<<“The bytes used by the variable name is
“<<size of(name);
cout<<“\n The bytes used by the variable str is
“<<size of(str);
}

Question 14.
Correct the program and write the output
#include<iostream>
using namespace std;
int main ()
{
char str [ ] = “Green Computing”;
int n;
n=strlen (str);
cout<<n;
return 0;
}
Answer:
The correct program is given below
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char str[ ]=“Green Computing”;
int n;
n=strlen(str);
cout<<n;
}
The output is 15 (The number of characters).

Question 15.
What is firewall?
Answer:
Firewall: It is a system that controls the incoming and out going network traffic by analyzing the data and then provides security to the computer network in an organization from other network (internet).

Question 16.
What is phishing?
Answer:
Phishing (Fishing): It is an attempt to get others information such as usenames, passwords, bank a/c details etc by acting as the authorized website. Phishing websites have URLs and home pages similar to their original ones and mislead others, it is called spoofing.

Answer any nine from question numbers 17 to 27. Each carries three scores. (9 × 3 = 27)

Question 17.
a) Number of symbols in a number system is called …………
b) Find MSD in the decimal number 7854.25.
c) Find the octal equivalent of (400)10.
Answer:
a) base/radix
b) MSD(Most Significant Digit) is 7.
c)
Plus One Computer Science Previous Year Question Paper March 2018, 4
(400)10 = (620)8

Question 18.
a) ASCII stands for …………
b) Find the largest number in the list
i) (10000)2
ii) (1000)8
iii) (100)10
iv) (10)16
Answer:
a) American Standard Code for Information Interchange
b) Convert all the numbers into decimal number system and can be easily find the largest number.
i) (10000)2 = (16)10
ii) (1000)8 = (512)10
iii) (100)10
iv) (10)16 = (16)10
So ii) (1000)8 = (512)10 is the largest number.

Question 19.
a) Name two different language processors which translate high level language program into machine language program.
b) What is operating system? Give two examples.
Answer:
a) Interpreter and Compiler
b) Operating System: It is collection of programs which acts as an interface between user and computer. Without an operating system computer cannot do anything. Its main function is make the computer usable and use hardware in an efficient manner, eg: Windows XP, Windows Vista, Linux, Windows 7, etc.

Question 20.
Distinguish between entry controlled loop and exit controlled loop.
Answer:
An entry controlled loop first checks the condition and execute(or enters into) the body of loop only if it is true. But exit control loop first execute the body of the loop once even if the condition is false then check the condition. The for loop and while loop are entry controlled loops but do-while loop is an exit controlled loop.

Question 21.
a) Draw a flow chart for the following algorithm.
step 1 : start
step 2 : N = 1
step 3 : Print N
step 4 : N = N + 1
step 5 : if n<=10 Then Go To step 3
step 7 : Stop
b) When we implement the above algorithm in C++, what will be the output?
Answer:
a)
Plus One Computer Science Previous Year Question Paper March 2018, 5
b) This will print numbers from 1 to 10.

Question 22.
What is the role of relational operators in C++? Give suitable examples.
Answer:
Relational operator: It is a binary operator. It is used to perform comparison or relational operation between two values and it gives either true(1) or false(O). The operators are <,<=,>,>=,== (equality)and !=(not equal to)
Eg. If x = 10 and y = 3 then
Plus One Computer Science Previous Year Question Paper March 2018, 6

Question 23.
Distinguish between break and continue statements in C++.
Answer:
break statement: It is used to skip over a part of the code i.e. we can premature exit from a loop such as while, do-while, for or switch.
continue statement: It bypasses one iteration of the loop and continue the iteration with the next value.

Question 24.
If 24, 54, 89, 56, 76, 42, 5 are the elements of an array, illustrate the working of selection sort algorithm for sorting these elements in descending order.
Answer:
Selection sort: In selection sort the array is divided into two parts, the sorted part and unsorted part. First smallest element in the unsorted part is searched and exchanged with the first element. Now there is 2 parts sorted part and unsorted part. This process continues.

Step 1: 24, 54, 89, 56,76, 42, 5
Here first find the largest one i.e. 89 and interchanged with the first one so the array is as follows
89, 54, 24, 56, 76, 42, 5.

Step 2: Here the first element 89 belongs to sorted part and the remaining elements belong to unsorted part. Then next find the largest element from the unsorted part, i.e 76 and interchanged with the second element 54. So the array is as follows 89, 76, 24, 56, 54, 42, 5
This process continues and the final array is as follows
89, 76, 56, 54, 42, 24, 5

Question 25.
Write a C++ program to input the scores of 5 students and display them in reverse order using an array.
Answer:
#include<iostream>
using namespace std;
int main()
{
int i,score[5];
for(i=0;i<5;i++)
{
cout<<“Enterthe score of Student”<<i+1<<“:”;
cin>>score[i];
}
cout<<“The score you entered in the reverse order”;
for(i=4;i>=0;i—)
cout<<“\nThe score of student”<<i+1<<“:”<<score[i];
}

Question 26.
Explain the difference between Call-by-Value and Call-by-Reference methods with suitable examples.
Answer:

Call by ValueCall by Reference
1. Ordinary variables are used as formal parameterReference variables are used as formal parameters
2. A copy of the original value is passedThe original value is passed
3. Any change made by the function will not affect the original valueAny change made by the function will affect the original value
4. Separate memory location is needed for actual and formal variablesMemory of actual arguments is shared by formal arguments.

Two types call by value and call by reference.
1. Call by value: In call by value method the copy of the original value is passed to the function, if the function makes any change will not affect the original value.
Example:
#include<iostream.h>
#include<conio.h>
void swap(int a, int b)
{
int temp;
temp=a;
a=b;
b=temp;
}
main()
{
clrscr();
int a,b;
cout<<“Enter values for a and b:-”;
cin>>a>>b;
cout<<“The values before swap a=“<<a<<” and b=”<<b;
swap(a,b);
cout<<“\n The values before swap a=“<<a<<” and b=”<<b;
getch();
}

2. Call by reference: In call by reference method the address of the original value is passed to the function, if the function makes any change will affect the original value.
Example:
#include<iostream.h>
#include<conio.h>
void swap(int &a, int &b)
{
int temp;
temp=a;
a=b;
b=temp;
}
main()
{
clrscr();
int a,b;
cout<<“Enter values for a and b:-”;
cin>>a>>b;
cout<<“The values before swap a=”<<a<<“ and b=”<<b;
swap(a,b);
cout<<“\n The values before swap a=”<<a<<“ and b=”<<b;
getch();
}

Question 27.
Explain the scope of variable in a C++ program.
Answer:

Local VariableGlobal Variable
1. Declared inside a blockDeclared outside of all blocks
2. It cannot be used any other blockIt can be used anywhere in the program
3. Memory is allocated when the block is activeMemory is allocated when the program begins
4. Memory is deallocated when the block is completedMemory is deallocated when the program terminates

Answer any two from questions numbers 28 to 30. Each carries five scores. (2 × 5 = 10)

Question 28.
List and explain various components of system software.
Answer:
System software:
It is a collection of programs used to manage system resources and control its operations. It is further classified into two.

  • Operating System
  • Language Processor

Operating System: It is collection of programs which acts as an interface between user and computer. Without an operating system computer cannot do anything. Its main function is make the computer usable and use hardware in an efficient manner, eg:- WindowsXP, Windows Vista, Linux, Windows 7, etc.

Major functions of an operating System:
i) Process management: It includes allocation and de allocation of processes(program in execution) as well as scheduling system resources in efficient manner
ii) Memory management: It takes care of allocation and deallocation of memory in efficient manner
iii) File management: This includes organizing, naming , storing, retrieving, sharing, protecting and recovery of files.
iv) Device management: Many devices are connected to a computer so it must be handled efficiently.

Language Processes: We know that a program is a set of instructions. The instructions to the computer are written in different languages. They are high level language (HLL) and low level language. In HLL English like statement’s are used to write programs. They are C, C++, COBOL, PASCAL, VB, Java etc. HLL is very easy and can be easily understood by the human being.

Low level language are classified into Assembly Language and Machine Language.
In assembly language mnemonics (codes) are used to write programs
Plus One Computer Science Previous Year Question Paper March 2018, 7

In Machine Language 0’s and 1’s are used to write program. It is very difficult but this is the only language which is understood by the computer.

Usually programmers prefer HLL to write programs because of its simplicity. But computer understands only machine language. So there is a translation needed. The program which perform this job are language processors. The different language processors are given below:

  1. Assembler: This converts programs written in assembly language into machine language.
  2. Interpreter: This converts a HLL program into machine language by converting and executing it line by line. The first line is converted if there is no error it will be executed otherwise you have to correct it and the second line and so on.
  3. Compiler: It is same as interpreter but there is a difference it translate HLL program into machine language by converting all the lines at a time. If there is no error then only it will executed.

Question 29.
a) What will be the output of the given C++ program?
Justify your answer.
#include<iostream>
using namespace std;
int main ()
{
inta,b,num;
for(a=1; a<10; ++a)
{
for(b=1; b<=5; ++b) num = a * b;
cout<<num<<endl;
}
return 0;
}
b) Rewrite the following program using while and do ………… while loops. (Write seperate programs)
#include<iostream>
using namespace std;
int main ()
{
int i;
for (i=1; i<=10; i++)
{
cout<<i;
}
return 0;
}
Answer:
The output is as follows
5 10 15 20 25 30 35 40 45 50
The program using while loop is as follows
#include<iostream>
using namespace std;
int main()
{
int i=1; while(i<=10)
{
cout<<i;
i++;
}
}
The program using do-while loop is as follows
#include<iostream>
using namespace std;
int main()
{
int i=1;
do
{
cout<<i;
i++;
}while(i<=10);
}

Question 30.
a) URL stands for …………
b) Explain the format of URL with an example.
c) What is the use of URL in computer networks?
Answer:
Uniform Resource Locator Uniform Resource Locator(URL): Every resource on the internet has a unique URL. Mainly it has three parts
Eg: http://www.hscap.kerala.gov.in /index.html.
http: http means hypertext transfer protocol. It is a protocol used to transfer hyper text.
www: World Wide Web. With an email address we can open our mail box from anywhere in the world.

hscap.kerala:- It is a unique name. It is the official website name of Single Window system
gov:- It is the top level domain. It means that it is a government organization’s website.
in:- It is the geographical top level domain. It represents the country .in is used for India.
index.html:- It represents the file name.
c) URL is used to identify the web server where the website files are stored.

Plus One Computer Science Previous Year Question Papers and Answers