# Plus One Computer Science Model Question Paper 3

## Kerala Plus One Computer Science Model Question Paper 3

Answer all question from 1 to 5

Question 1.
The computing machine developed by Balaise Pascal is known as ………………………………..

Question 2.
The conditional operator is ……………… opera­tor.

Question 3.
Write the name of the header file which contains the exit( ) function.

Question 4.
……………. is stored at the end of the string.

Question 5.
A short distance wireless internet ac­cess method is…

Answer any nine questions from 6 to 16

Question 6.
Compare the Roman number system and Mayan’s number system.

Question 7.
If (X)2 – (1o1o)2 = (1ooo)2 then find X.

Question 8.
Describe the use of electronic spread­sheets.

Question 9.

Question 10.
Some of the literals in C++ are given below. How do they differ?

Question 11.
What will be the result of the following if ans is 6 initially?

1. cout <<ans = 8 ;
2. cout << ans == 8;

Question 12.
Write a C++ code segment to input val­ues into the array:

Question 13.
Predict the output of the following code segment:

char str[] = “program”;
for (int i=o; str[i] != ‘\o’; ++i)
{
putchar(str[i]);
putchar(‘-’);
}

Question 14.
Write down the output of the following code segment:

puts(“hello”);
puts(“friends”);

Question 15.
How can multimedia content be sent using mobile phones?

Question 16.
What are the functions of the mobile oper­ating system?

Answer any nine questions from 17 to 27

Question 17.
Find dual of following Boolean expressions:

1. X. Y + Z
2. C + A.1 + A.C
3. (A+o).(A.1. A )

Question 18.
Fill in the blanks

1. (———– )2 = (AB)l6
2. (__ D__ )l6 = (1010_____ 1ooo)2
3. 2510 = (______ )2

Question 19.
Differentiate compiler and interpreter.

Question 20.
Draw a flowchart to input ten different numbers and find their average.

Question 21.
Write a C++ program to check whether the given number is prime or not.

Question 22.
In how many ways can a variable be declared in C++?

Question 23.
Write a program to find the largest among the three numbers.

Question 24.
Write a C++ program to find the sum of major diagonal elements of a matrix,

Question 25.
What are the differences between the linear search method and the binary search method?

Question 26.
What are the advantages of the modular style of programming?

Question 27.
Distinguish between exit( ) function and return statement.

Answer any two questions from 28 to 30

Question 28.
Define the term green computing. List and explain the approaches that you can adopt to promote green computing concepts at all possible levels.

Question 29.
Write a program using a nested loop that inputs a number n which generates an output as follows. [Hint: If the value of n is 5, the output will be as]

Question 30.
What is network protocol? Explain.

Pascaline

ternary

process.h

The null character ‘\o’

Wimax

The Romans used 7 letters (I, V, X, L, C, D, and M) of the alphabet for representing numbers.
The Mayans used a number system with base 20. It is the sum of the number of fingers and toes. This number system could produce very accurate astronomical observations and make measurements with greater accuracy.

(X)2 – (1o1o)2 = (1ooo)2
(X)2 – 10 = 8
18 – 10 = 8
(18)10= (1oo1o)2 = (X)2

Spreadsheet software allows users to perform calculations using spreadsheets. eg., Microsoft Excel, Open Office calc, Lotus 1-2-3, and Apple numbers.

Top-down design: It is the process of breaking the overall procedure or task into component parts (modules) and then subdividing each component module until the lowest level of detail is reached. It is also called top-down decomposition.
Bottom-up design: Once the overall procedure or task is broken down into component parts (modules) and each component module are further subdivided until the lowest level of detail has been reached, we start solving from the low­est module onwards. The solution for the main module will be developed only after designing a specific solution to its submodules.

5 is an integer literal.
‘5’ is a character literal.
5.0 is floating point literal.
“5” is string literal.

1. 8
2. The result will be o (false) because of 6
3. is not equal to 8.

for (int i=o; i<50; i++)
{
cin>>ar[i];
}

p-r-o-g-r-a-m-

hello friends

Multimedia Messaging Service (MMS) is the standard way to send and receive messages consisting of multimedia con­tent using mobile phones.

It is an OS used in handheld devices such as a smartphone, tablet, etc. It man­ages the hardware, multimedia func­tions, internet connectivity, etc. eg., Android, iOS.

a. X + Y.Z
b. A + C . A+o . A + C
c. (A . l) + (A + o + $$\bar { A }$$)

a. A → 1010, B → 1011
(1010101l)2
b. (AD8)26 = (1010 1101 1ooo)2
c. (o.o1)2

Compiler: It translates a high-level language into machine language by converting all the lines at a time. The errors are provided at the end of the compilation. The programming language that has a compiler are C, C++, Pascal, etc.
Interpreter: It converts a high-level language into machine language by-line by line. If there is an error in one line, it reports and the execution is terminated. It will continue the translation only after the correction of the error, eg., BASIC is an interpreted language.

#include<iostream>
#include<cstdlib>
using namespace std; int main()
{
int i, num;
cout<<“Enter the number: cin>>num;
for(i=2; i<=num/2; ++i)
}
if(num%i == o)
{
cout<<“Not a Prime Number”; exit(o);
}
}
cout<<“Prime Number”; return 0;
}

In C+ +, variable can be declared in three ways. They are:

• Uninitialized variable, eg., int a;
• Initialised variable, eg., int a = 2;
• Dynamically initialized variable,
• eg., int a = b + 10;

#include <iostream>
using namespace std;
int main( )
{
int a, b, c;
cout << “Enter three different num­bers: ”;
cin >>a>>b>>c;
if (a > b)
{
if (a > c)
cout<<“The largest number is:”<< a; else
cout << “The largest number is:”<<c;
}
else
{
if Ob > c)
cout << “The largest number is:”<<b; else
cout << “The largest number is: ”<<c;
}
return o;
}

#include <iostream>
using namespace std; int main( )
{ int mat[io][io], n, i, j, s=o;
cout<<“Enter the rows/columns of square matrix: ”;
cin> >n;
cout<<“Enter the elements\n”; for(i=o; i<n; i++)
for(j=o; j<n; j++)
cin> >mat[i][j];
cout<<“Major diagonal elements are\n”;
for(i=o; i<n; i++)
{
cout<<mat[i][i]<<“\t”;
s = s + mat[i][i];
}
cout<<“\nSum of major diagonal elements is:
cout<<s;
return o;
}

Linear search method:

• The elements need not to be in any or­der.
• Takes more time for the process.
• May need to visit all the elements.
• Suitable when the array is small.

Binary search method:

• The elements should be in sorted or­der.
• Takes very less time for the process.
• All the elements are never visited.
• Suitable when the array is large.

• It reduces the size of the program
• Less chances of error.
• Modularization reduces program­ming complexity.
• Improves reusability.

The return statement returns a value to the calling function and transfers the program control back to the calling function.
The exit( ) function terminates the ex­ecution of the program itself.

Green computing is the study and prac­tice of environmentally sustainable computing or IT. To promote green computing, there are 4 approaches are used. They are:

1. Green design: Designing energy effi­cient and eco-friendly computers and devices.
2. Green manufacturing: Minimising waste during the manufacturing of IT devices.
3. Green use: Minimising the electric­ity consumption of computers.
4. Green disposal: Reconstructing used computers or appropriately disposing off or recycling unwanted electronic equipment.

#include<iostream>
using namespace std;
int main( )
{
int n, i, j, s;
cout<<“Enter the value of n”; cin> >n;
for (i=n; i>=i; i- -)
{
for (j=n; j>=i; j- -)
{
s = j * j;
cout<<s<<“\t”;
}
cout< <“\n”;
}
return o;
}