0% found this document useful (0 votes)
31 views61 pages

I PUC Computer Science

Uploaded by

King Joker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views61 pages

I PUC Computer Science

Uploaded by

King Joker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

1

I PUC Computer Science


Model Question Paper
Solved 2023

PREPARED BY
MAHESH ARALI
2

PART - A
Answer all the questions. Each question
carries one mark. 20 X 1 = 20

I. Select the correct answer from the choices given.


(Repeated answers will not be considered)
3

1) Which of the following is not considered hardware?


a) Operating system
b) CPU
c) Keyboard
d) Hard disk
Answer : Operating system
4

2) The following is not an output device.


a) Scanner
b) VDU
c) Speaker
d) Printer
Answer : Scanner
5

3) What is smallest unit of the information?


a) A bit
b) A byte
c) A block
d) A nibble
Answer : A bit
6

4) Which of the following is not an Octal number?


a) 145
b) 178
c) 111
d) 123
Answer : 178
7

5) What is the first step in solving a problem?


a) Analysis
b) Solution
c) coding
d) Problem definition
Answer : Problem definition
8

6) Algorithm is a
a) Step-by-step process for a program
b) Step-by-step process for a flowchart
c) Step-by-step process for a solution
d) Step-by-step process for a coding
Answer : Step-by-step process for a solution
9

7) Which of the following is a keyword?


a) Person
b) Variable
c) Identifier
d) for
Answer : for
10

8) Give the header file that holds setw( ) and endl


a) <stdio.h>
b) <string.h>
c) <iostream.h>
d) <iomanip.h>
Answer : <iomanip.h>
11

9) The following is a selection statement:


a) if
b) if else
c) switch ( )
d) All of the above
Answer : All of the above
12

10) What is the subscript data type of an array?


a) Integer
b) Float
c) Double
d) String
Answer : Integer
13

11) Select how user defined functions are


invoked/called, from the following:
a) Input statement
b) Assignment statement
c) declaration
d) Break statement
Answer : Assignment statement
14

12) What does the keyword void represent?


a) Returns many value
b) No return value
c) Returns a single value
d) Returns int or float value
Answer : No return value
15

13) Which item is printed at the bottom of each page:


a) Header
b) Foot note
c) Title
d) Footer
Answer : Footer
16

14) Which of the following application software is used


for making a resume?
a) MS-Excel
b) MS-Word
c) C++
d) Java
Answer : MS-Word
17

15) What is the intersection of row and column in a


worksheet called?
a) column
b) Value
c) Address
d) Cell
Answer : Cell
18

II. Fill in the blanks choosing the appropriate


word/words from those given in brackets.
(Note: Repeated answers will not be
considered)

(array, cout, main( ), subprogram, break)


16) Every C++ program begins execution at the 19

function main ( ).
17) The result will be displayed using cout ( ).
18) Break is a control statement.
19) To store many values in the same variable array is
used.
20) User defined function is known as Subprogram.
20

PART - B

Answer any FOUR questions. Each question


carries two marks. 4X2=8
21

21) Write a short note on applications of computers in


entertainment.
Ans: Applications of computer in Entertainment are as follows:
1) The user can download and watch movie.
2) Used in animation to create cartoon films and games.
3) Computers are used to play games, chatting with friends.
22

22) Mention any two types of ROM.


Ans: Different types of ROM are as follows:
 PROM (Programmable Read Only Memory).
 EPROM (Erasable Programmable Read Only Memory).
 EEPROM Electrically Erasable Programmable Read Only
Memory).
23

23) What is a system software? Give example


Ans: System software is a computer program that controls the
system hardware and interacts with application software.
System software is hardware dependent and not portable.

Ex: Windows XP.


24

24) Define coding and testing.


Ans:
Coding: The process of writing program instructions for an
analyzed problem in a programming language.

Testing: The process of checking whether the program works


according to the requirements of the user.
25
25) Write any two characteristics of oops.
Ans: Characteristics of oops as follows:
Object: object is an identifiable entity with some characteristics
and behaviour.

Class: class is a group of object which share common properties


and relationship.
26
26) What is a variable? Give the declaration syntax for a variable.
Ans: Variable is a quantity whose value may change during the
execution of a program is called as variable. The general syntax
as shown below:

datatype variable_name1, variable_name2,…, variable_nameN;


27
27) Distinguish between isupper ( ) and islower ( )function in
C++.
Ans:
Isupper ( ) Islower ( )
It returns true, if the given It returns true, if the given
character is a uppercase character is a lowercase.
otherwise it returns false. Otherwise it returns false.
Ex: isupper(‘a’) Ex: islower(‘g’)
It returns false or zero. It returns true or one.
28
28) Differentiate between copy-paste and cut-paste options in
word processor.
Ans: The cut paste command, removes the selected data form
its original position.
While the copy paste command, creates a duplicate.(same data is
present in multiple places).
29

PART - C

Answer any FOUR questions. Each question


carries three marks. 4 X 3 = 12
30
29) Give the characteristics of non-impact printers.
Ans: Characteristics of non-impact printer as follows:
 They possess the ability to change type face automatically.
 These printers produce high quality graphics.
 These printers usually support the transparencies.
 Measured in dots per inches (DPI).
 The speed is calculated by the number of pages per minute (PPM).
31
30) Convert 37(16) to binary and to decimal.
Ans:

In Binary In Decimal
(110111) 2 (55) 10
32
31) Define
1)Assembler 2)Compiler 3)loader
Ans:
Assembler: Assembler is a translator, which translate from assembly level
language to low level language.
Compiler: Compiler is a translator, which translate from high level
language to low level language.
Loader: A loader is system software that loads machine code of a
program into the system memory and prepares these programs for
execution.
33
32) Explain sequence programming construct with an example.
Ans: Sequence construct:- Sequence is the simplest of all structures used
in programming. The program statements are executed one after
another, in a sequence.

Block A Input : radius

Block B Area = 2 * 3.142 *radius

Block C Output : Area


34
33) Briefly explain any three relational operators in C++.
Ans : A relational operator compares two values and determines the
relationship between them. A relational operation generates an output of
either TRUE or FALSE. Let us assume that variable a = 5 and variable b =
10 then
Operator Description Example
== Returns true if a and b are equal (a = = b) is false
> Returns true if a is greater than b (a > b) is false
< Returns true if a is less than b (a < b) is true
>= Returns true if a is greater than or equal to b (a >= b) false
<= Returns true if a is less than or equal to b (a <= b) true
!= Returns true if a and b are not equal (a != b) true
35
34) Explain cascading of input output operators with example for each.
Ans: C++ supports the use of stream extraction (>>) and stream insertion
(<<) operators many times in a single input (cin) and output (cout)
statements. If a program requires more than one input variable then it is
possible to input these variables in a single cin statement using multiple
stream extraction operators.

Similarly, when we want to output more than one result then this can be done
using a single cout statement with multiple stream insertion operators. This is
called as cascading of input output operators.
Ex: 36
cout<<“Enter the value of A”;
cin>>A; Instead of using cin statement twice, we can use a
cout<<“Enter the value of B”; single cin statement and input the values for two
variables A and B using multiple stream
cin>>B;
extraction operator as shown below.

cout<<“Enter the value for A and B”;


cin>>A>>B;
Similarly, we can even output multiple results in a single cout statement using
cascading of stream insertion operator as shown below;
Ex: cout<<“ The sum of “ <<A<<“ and “<<B<<“ = “<<A+B;
37
35) Write memory representation of one-dimensional array.
Ans: The elements of one-dimensional arrays are stored in contiguous
memory locations.
Ex: Consider the declaration, int a[3];
The element a[0] is allocated at a particular memory location, the element a[1] is
allocated at next memory location and so forth. Since the array is of the type
integer, each element occupies 2-bytes.
38
The amount of storage space required to hold an array is directly
related to its type and size of the array.

The total size can be calculated using the relation:

Total-size = sizeoff( data type ) * size of array

The total size to integer array required is 2 * 3 = 6-bytes


39
36) Define a structure in C++. Explain with syntax and example.
Ans: A structure is a collection of simple variables. The variables in a structure can be of same
or different types. Some can be int, some can be float and so on. The data items in a structure
area called as members of the structure.
Ex: A structure definition to hold employee
struct structurename
information
{
datatype membername1;
struct Employee
datatype membername2;
{
datatype membername3;
int empno;
…………………………….
char name[25];
…………………………….
char designation[10];
datatype membername n;
float salaray;
};
};
40

PART - D

Answer any SIX questions. Each question


carries FIVE marks. 6 X 5 = 30
41
37) Explain the various functional units of a computer with a neat block
diagram.
Ans:
42
Input Unit:- Computers need to receive data and instructions in order to solve a
problem. The Input unit performs this operation. The Input Unit basically links the
external world to the computer system. The input unit may consist of one or more
input devices. Commonly used input devices are Keyboard and mouse.
Central Processing Unit (CPU):- It is the main part of a computer system like the
heart of a human being. Most computers are identified by the type of CPU that is
present in them. The function of the CPU is to interpret the instructions in the
program and execute them one by one. It consists of two major units.
Control Unit(CU): It controls and directs the transfer of program instructions and
data between various units. The main activity is to maintain order and direct the
operations of the entire system.
43
Arithmetic and Logic Unit (ALU): Arithmetic and Logic Unit performs arithmetic
and logical operations and controls the speed of these operations. Arithmetic
operations like addition, subtraction, multiplication and division (+,-,*, /) and
logical operations like AND, OR, NOT and relational operations like (<,>,
<=,>=) are being carried out in this unit.
Memory Unit :-The data and the instructions required for processing have to be
stored in the memory unit before the actual processing starts.
Output Unit:- It is used to print or display the results, which are stored in the
memory unit. The actual function of the output unit is just the reverse of the input
unit. Thus, the output unit links the computer to the outside world. The Monitor
and Printer are the most commonly used output devices.
44
38) Subtract 1610 from 2310 using 1’s complement.
Ans: Subtrahend = 16 = 10000
Minuend = 23 = 10111
Take 1’s complement for the subtrahend
10000 => 01111 add this result with minuend
Hence, we get.
10111
01111_
100110
1
00111 = +7
45
39) Write an algorithm to find the sum of the digits in a given number.
Ans:
Algorithm
Step 1: start
Step 2: input : N
Step 3: while (N ≠ 0)
rem = N % 10
sum = sum + rem
N = N/10
while end
Step 4:print : sum
Step 5:stop
46
40) Explain structure of C++ program with a suitable programming example
Ans:
Structure of C++ Program
Comments or Documentation section
Linker section
Definition section
Global variable declaration section
Void main ( )
{
Declaration statements section
Executable statements section
}
47
1. Documentation section or Comments
This section allows us to write comments about what each statement is doing.
They are not executed by the compiler. But they definitely provide the required
explanation about the program to the programmers. Comments are of two
types.
Single line comment starts with // (double forward slash)
Multi line comment starts with /* and end with */
2. Linker Section or Header file
# include<iostream.h>
#include<conio.h>
The linker section begins with a hash (#) symbol. These statements tells the
compiler to include the header files iostream.h and conio.h into the program.
3. Definition Section 48
# define PI 3.142
We can define constants, expressions, functions. After the linker (header file)
section get executed, the definition section is executed by the compiler and this
section is optional. In the above example, we find that PI is a constant identifier
which takes the value 3.142 and wherever this identifier is used the compiler
replaces the value with 3.142 in the program.
4. Global declaration Section
We can declare variables here and those variables which are declared before the
main function or any other function the scope of such variables remain
throughout function and can be used by other function. This section is also
optional
49
5. Void main ( ) : This instruction marks the beginning of the main
function and it contains the statements that perform the required task.
This statement is executed first by the compiler when the program starts.
It is also important to note that there will be only one main ( ) function in
a program.
6.A pair of flower brackets { }: The statements inside any function
including the main( ) function is enclosed with the opening and closing
braces.
7. Variable declaration section: In the above example program, we have
declared variables and also its data types. This helps the compiler to
allocate the memory space inside the computer memory.
50
8. Executable statements section: The statements are written inside the main( )
function or any other function. These statements can be expressions, input-
output functions, conditional statements, looping statements and function call
and so on. The cout (output statement) function statement is a user prompt
which tells the user to input the value for the radius and the text present inside
the double quotes “ Input the value of radius” is displayed on the output screen.
The next is the cin (input statement) function statement which takes the input
that is given by the user. The next two statements are C++ expressions that
calculate the area and circumference of the circle respectively.

Finally, the next two output statements display the computed area and
circumference respectively.
// Program to find the area and circumference of a circle
51
#include<iostream.h>
#define PI 3.142
void main ( )
{
int radius;
float circum, area;
cout<<“Input the value of radius”;
cin>>radius;
area = PI * radius * radius;
circum = 2 * PI * radius;
cout<<“Area of Circle is = ”<<area<<endl;
cout<<“Circumference of Circle is = ”<<circum<<endl;
}
41) Explain if-else statement with a suitable programming example. 52
Ans: This structure helps to decide whether a set of statements should be executed
or another set of statements should be executed. This statement is also called as
two - way branching. It executes some set of statements when the given condition
is TRUE and if the condition is FALSE then other set of statements to be
executed. The general form of if else statement is.

if(test condition) If the given condition is TRUE then statemen1 will be


statement 1; executed. Otherwise statement2 will be executed. Only the
code associated with if or the code associated with else will
else be executed, never both. It is important to note that after
statement 2; executing either statemen1 or statement2, the ompiler control
next statement; goes to the next statement in the program.
53
#include<iostream.h>
#include<conio.h>
void main( )
{
int breadth, height;
clrscr( );
cout<<“Enter the value of breadth and height \n” ;
cin>>breadth>>height;
if(breadth == height)
cout<<“It is a square ”;
else
cout<<“It is rectangle ”;
getch( );
}
42) Differentiate between while and do-while loops. 54
Ans:.
While loop Do while loop
This is a pre-tested looping structure This is a post-tested looping structure

It tests the given condition at initial point It tests the given condition at the last of
of looping structure looping structure.
Minimum execution of loop is zero Minimum execution of loop is once.

Syntax: Syntax:
while ( Test condition ) do
{ {
statement 1; statement 1;
statement 2; statement 2;
…………….; statement n;
statement n; }
} while ( Test condition);
Semi colon is not used. Semi colon is used.
55
43) What is 2-dimensional array? Give the syntax and example for declaring 2-
dimensional array.
Ans: An array is a collection of elements having same name and same type
ordered in two-dimensional that is in the form of rows and columns is called as
two-dimensional array.

The general syntax as shown below:


data_typearray_name[row size][column size];

The example as shown below:


int matrix[3][3];
56
44) Explain the working of function with arguments and return value.
Ans: In this type of function the first function calls the second function by passing
some arguments or values to the second function. The second function performs
its calculations and returns the answer or a value back to the first function. The
general syntax as shown below.

void fun1( ) return type fun2(x, y)


{ {
……. Function call with arguments
x = fun2(a, b); Statement block
……. return value …….
……. return(ans);
} }
// program to demonstrate function with argument and with a return value. 57
#include<iostream.h>
#include<conio.h> long REVERSE(long n)
long REVERSE (long); {
{ int r;
long num, rev; long rev = 0;
clrscr( ); while(n!=0)
cout<<“Input a number \n”; {
cin>>num; r = n % 10;
Output
rev = REVERSE(num); n = n/10;
if(num == rev) rev =rev * 10 + r;
cout<<num<<“is a palindrome\n”; }
else return rev;
cout<<num<<“is not a palindrome\n”; }
getch( );
}

In the above program, the main( ) function reads the input data from the terminal and passes it on to
the called function. REVERSE. The function returns the reversed number to the calling program and
compared with the original num.
58
45) Mention various applications of spreadsheet.
Ans:
 The ESS is the best tools for all the text and calculations involved
applications.
 The accounting balance sheet generation for the auditing.
 The area where the graphical presentation is required like statistical details
presentations.
 In the schools and educational instructions for the presentations of the
graphs and charts.
 Multiple accounting is involved in the file of budgeting for industry or
company or IT firms.
59
46) Explain any five built-in functions of ESS.
Ans: ESS built
Today( ): This function is used to returns system date.
Sqrt( ): This function is used to return the square root of the number.
Gcd ( ): This function is used to returns the greatest common divisor.
Concatenate ( ): This function is used to joins the several text values items into one
text item.
Len ( ): This function is used to returns the number of characters in a text string.
Average ( ): This function is used to returns the average value from the range of
cells.
47) What is HTML? Explain any four HTML tags. 60
Ans: HTML is stands for Hyper Text Markup Language it is used to design the web-page or web-site.
1. <b> : defines bold text. It makes the data to appear as thicker and darker.
Ex : <b> Model question paper </b>
Model question paper
2. <i> : defines italicized text. It makes the data to appear as italic style.
Ex : <i> Model question paper </i>
Model question paper
3. <u> : defines underlined word. It makes the data to be underlined.
Ex : <u> Model question paper </u>
Model question paper
4. <br> : defines a single line break. Not to separate paragraph <br> tag is useful for writing address.
Ex : PROM<br>EPROM<br>EEPROM
PROM
EPROM
EEPROM
61
Share The Knowledge
&

Spread The Smile


Thank You For Watching This Video.

You might also like