0% found this document useful (0 votes)
59 views71 pages

Hsslive Pyq Cs Xi

Uploaded by

jiamohdpt27
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)
59 views71 pages

Hsslive Pyq Cs Xi

Uploaded by

jiamohdpt27
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/ 71

Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.

in ®

Chapter 1
The Discipline of Computing

Computing milestones and machine evolution


1. What is the base of Mayan Number System? Score 1
20

2. Name the ancient number system with the largest base. Score 1
Sumerian / Babylonian

3. _________ was discovered by the Mesopotamians around 3000 BC Score 1


Abacus

4. Difference Engine was developed by _________. Score 1


Charles Babbage

5. Who is known as ‘Father of Computer’ ? Score 1


Charles Babbage
--------------------------------------------------------------------------

Generations of computers
1. Write short note on First Generation Computers. Score 2
First Generation Computers were built using vacuum tubes. Stored program concept was
implemented. The input was based on punched cards and paper tapes. The output was displayed on
printouts.
Example : ENIAC, EDVAC, UNIVAC

2. Draw the block diagram of John Von Neumann's computer architecture. Score 2
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

3. Briefly explain about First, Second and Fifth generations of computers. Score 3
First Generation Computers were built using vacuum tubes. Stored program concept was
implemented. The input was based on punched cards and paper tapes. The output was displayed on
printouts.
Second Generation Computers were built using transistors. They were smaller, more
powerful and faster. They required less electricity, emitted less heat and less expensive too.
Fifth generation computers are based on Artificial Intelligence (AI). They are used in some
applications such as speech recognition, face recognition, robotic vision etc. The two most common
AI programming languages are LIST and Prolog.

4. Write a short note about third generation of computers. Score 3


Third Generation Computers were built using Integrated Circuits (IC). They were smaller, more
efficient and faster. It had better processing speed, consumed less power and was less costly. Core
memory was replaced by solid state memory. New Input / Output devices like keyboard and monitors
were introduced.

5. What are the characteristics of fourth generation computers? Score 2


The technology used is Microprocessor. So the computers are smaller in size, and have faster
processing speeds.
Example : IBM PC

6. Expand the following Score 2


a. ENIAC
b. VLSI

a. Electronic`Numerical Integrator and Calculator


b. Very Large Scale Integration

7. Match the following. Score 2

a) First Generation Computer ii) Vacuum Tube


b) Second Generation Computer iii) Transistor
c) Third Generation Computer iv) Integrated Circuit
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

d) Fourth Generation Computer I) Microprocessor

8. Compare any three features of five generations of computers. Score 3

9. Write a short note about first three generations of computers. Score 3


Refer Qn 3 & 4
------------------------------------------------------------------------------------

Evolution of computing
1. Who is known as the father of Modern Computer Science? Score 1
Alan Turing

2. Who is known as the Father of Computer Science as well as Artificial Intelligence ? Score 1
Alan Turing
-----------------------------------------------------------------------------------------------------------------------

Chapter 2
Data Representation and Boolean Algebra
Number Systems
1. Number of symbols in a number system is called ………………. 1
Base

2. Each digit of a binary number is called …………… 1


Bit

3. Define the term ‘bit’? 1


Each digit od a binary number

4. Explain about any three number systems. 3

Name Symbols Base Example


Binary 0,1 2 (1001)2
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Octal 0,1,2,3,4,5,6,7 8 (371)8


Decimal 0,1,2,3,4,5,6,7,8,9 10 (386)10
Hexadecimal 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F 16 (1D6)16

Number Conversions
1. The number (158)10 can be represented in hexadecimal number system as ………. 1

16 158
16 9 14 (E)
0 9

Ans. (9E)16

2. Find octal equivalent of (400)10 1


8 400
8 50 0
86 2
0 6
Ans. (620)8

3. Convert
a. (234)10 to binary
b. (1234)10 to Hexadecimal 3

a.

2 234
2 117 0
2 58 1
2 29 0
2 14 1
27 0
23 1
21 1
0 1
Ans. (11101010)2
b.
16 1234
16 77 2
16 4 13 (D)
0 4

Ans. (4D2)16
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

4. Convert Decimal (28)10 to Binary. 2

2 28
2 14 0
27 0
23 1
21 1
0 1
Ans. (11100)2

5 Convert (1234)10 to (-------------)8 2

8 1234
8 154 2
8 19 2
82 3
0 2

Ans. (2322)8

6. Fill in the blanks


(………...)10 = (11001)2

11001 = 1 x 24 + 1 x 23+ 0 x 22 + 1 x 21 + 1 x 20
= 1 x 16 + 1 x 8 + 0 + 0+ 1 x 1
= 16 + 8 + 1
= (25)10
Ans. (25)10

7. Fill in the blanks


(1011)2 = (________)10 1

Ans. (11)10

8. Fill in the blanks 1


(_____)10 = (11011)2

Ans. (27)10

9. Fill in the blanks


(100)2 to (-------------)10 1

Ans. (4)10
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

10. Do the following number conversions.


(34)8 to decimal

34 = 3 x 81 + 4 x 80
=3x8+4X1
= 24 + 4
= 28
Ans. (28)10

11. Fill in the blanks. 1


(164)8 = (………….)2

1 6 4
001 110 100

Ans. (001110100)2

11. Fill in the blanks. 1


(AB)16 = (……...)2

A B
1010 1011

Ans. (10101011)2

11. Fill in the blanks. 1


(AC)16 = (_____)2

A C
1010 1100

Ans. (10101100)2

12. Fill in the blanks. 1


(F)16 to (-------------)2

F
1111

Ans. (1111)2

13. Fill in the blanks. 1


(1011010)2 = (………...)16
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

1011010 = 0101 1010


= 5 10 (A)
= (5A)16

Ans. (5A)16

14. If (x)8 = (101011)2 = (y)16. Find the values of x and y. 2


(101011) = 101 011
= 5 3
= (53)8

(101011) = 0010 1011


= 2 11(B)
= (2B)16

15. Convert (11011)2 to Octal decimal and Hexadecimal number systems. 3


11011 = 011 011
=3 3
= (33)8

11011 = 0001 1011


= 1 11(B)
= (1B)16

11011 = 1 x 24 + 1 x 23 + 0 x 22 + 1 x 21 + 1 x 20
= 1 x 16 + 1 x 8 + 0 + 1 x 2 + 1 x 1
= 16 + 8 + 0 + 2 + 1
= (27)10

16. (507)8 = ( _____ )2 = ( ______ )16 2

5 0 7
101 000 111
(101000111)2

101000111 = 0001 0100 0111


= 1 4 7
= (147)16

17. Find the largest number in the list.


i) (10000)2
ii) (1000)8
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

iii) (100)10
iv) (10)16 3

(Convert all Numbers to Decimal)


i) (10000)2 = 1 x 24 = 1 x 16 = (16)10
ii) (1000)8 = 1 x 83 = 1 x 512 = (512)10
iii) (100)10
iv) (10)16 = 1 x 161= 1 x 16 = (16)10
The largest number is (1000)8

Data Representation
1. What is Sign Magnitude Representation? Represent 100 in that form. 3
In this method, MSB is used for representing sign of integer. Remaining 7 bits are used for
representing magnetude of integer.
2 100
For negative numbers sign bit is 1 and for positive numbers sign bit is 0.
2 50 0
2 25 0
100
2 12 1
Number is positive, so MSB is 0.
26 0
7 bit binary equivalent of 100 = 1100100
23 0
100 = (01100100)2 21 1
0 1
2. Represent the following integers in sign and magnetude, 1s complement and 2s complement form.
a) +25
b) -30 3

a) + 25
Sign & Magnetude
Number is positive, so MSB is 0.
7 bit binary equivalent of 25 = 0011001
25 = (00011001)2

1’s Compliment
Binary of 25 in 8 bit form = 00011001
25 in 1’s compliment form = (00011001)2

2’s complement
Binary of 28 in 8 bit form = 00011001
25 in 2’s complement form = (00011001)2
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

b) -30
Sign & Magnetude
Number is negative, so MSB is 1
7 bit binary equivalent of 30 = 0011110
-30 = (10011110)2
1’s Compliment
Binary of 30 in 8 bit form = 00011110
30 in 1’s compliment form = (11100001)2

2’s complement
Binary of 30 in 8 bit form = 00011110
30 in 2’s complement form = 11100001 +
1
(11100010)2

3. Find the 1's Compliment and 2's Compliment form of (–78)10 . 3


1’s Compliment
Binary of 78 in 8 bit form = 01001110
78 in 1’s compliment form = (10110001)2

2’s complement
Binary of 78 in 8 bit form = 01001110
78 in 2’s complement form = 10110001 +
1
(10110010)2

4. Represent -38 in 2s complement form. 2

2’s complement
Binary of 38 in 8 bit form = 00100110
38 in 2’s complement form = 11011001+
1
(11011010)2

5. Briefly explain any three methods of representing characters in computer memory. 3


i. ASCII
ASCII stands for American Standard Code for Information Interchange. It is a 7 bit code. ASCII
code can represent only128 characters. Later 8-bit ASCII was introduced. It can represent 256
characters.
Eg. ASCII code of A is 65.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

ii. EBCDIC
It stands for Extended Binary Coded Decimal Interchange Code. It is an 8 bit code. It can represent
256 characters.
Iii. UNICODE
Unicode is a 16 bit code. So it can represent 65536 characters. Unicode can represent characters in
almost all written languages of the world.

6. ASCII stands for _____ . 1


American Standard Code for Information Interchange

7. MIDI stands for …………………. 1


Musical Instrument Digital Interface

8. Write the expansions of the following Graphical Image Formats.


a. JPEG b. GIF c. PNG 3

JPEG - Joint Picture Experts Group


GIF - Graphics Interchange Format
PNG - Portable (Public) Network Graphic

9. List any four image file formats. 2


BMP, GIF, TIFF, PNG, JPEG

Introduction to Boolean Algebra


1. Describe Logic Gates OR, AND, NOT with Symbol and Truth Table. 5
OR
The logical gate that performs logical OR operation is called logical OR Gate.

Symbol

AND
The logical gate that performs logical AND operation is called logical AND Gate.

Symbol

Truth Table
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

NOT
The logical gate that performs logical negation is called logical NOT Gate. It is also called
inverter.

Symbol Truth Table

Basic Postulates of Boolean Algebra


1. Find the Dual of the Boolean expression A + 0 = A 1
A.1=A

2. Find the dual of A+A’ = 1 1


A . A’ = 0

De Morgan’s Theorems
1. State De'Morgan's theorems. 2
a. The complement of sum of Boolean variables is equal to product of their individual components.
b. The complement of product of Boolean variables is equal to sum of their individual components.

2. Prove that (A+B)’ = A’ . B’ 2


A B A’ B’ (A+B)’ A’.B’
0 0 1 1 1 1
0 1 1 0 0 0
1 0 0 1 0 0
1 1 0 0 0 0
Hence Proved

Circuit designing for simple Boolean expressionas


1. Draw the logical circuit for the Boolean expression A’ . B + A . B’ 3
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

2. Draw the logic circuit for Boolean expression X.Y+Y

Universal Gates
1. What are universal gates in Boolean algebra? Draw its symbols. 3
A universal gate is a gate which can implement any Boolean function without using any other
gate type. The NAND and NOR gates are universal gates in Boolean Algebra.
NAND gate
NAND gate is an inverted AND gate.

NOR gate
NOR gate is an inverted OR gate.

2. Draw the truth table of NAND gate. 2

-----------------------------------------------------------------------------------------------------------------------

Chapter 3
Components of the Computer System

Hardware
1. Tangible and visible parts of computer is known as ________. 1
Hardware
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

2. The fastest memory in a computer is …………… 1


Register

3. What are CPU Registers ? Give one example. 2


Registers are temporary storage locations inside CPU. Its contents can be accessed more
quickly by the CPU than other memory.

4. Write the names of any four CPU registers. 2


Accumulator, Memory Address Register (MAR), Instruction Register (IR), Program Counter (PC)

5. Expand the following : 2


(a) USB (b) HDMI

USB – Universal Serial Bus


HDMI - High Definition Multimedia Interface

6. 1 Byte = ………. Bits 1


8 Bits

7. Compare RAM and ROM. 3

RAM ROM
Faster than ROM Slower memory
Stores Operating System, application programs Stores BIOS
and data while computer is ON
read/write memory Read only memory
Volatile Non volatile

8. What is cache memory? 2


Cache memory is a small and fast memory between processor and RAM. Frequently accessed
data, Instructions and intermediate results etc are stored in cache for quick access.

9. Small and fast memory between processor and RAM is called ……….. 1
Cache memory

10. Write any two examples of optical storage devices. 1


CD, DVD, Blu-Ray

11. Write the following memory devices in the order of their speed. 1
i) cache ii) RAM iii) Hard Disk iv) Registers
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

iv) Registers i) cache ii) RAM iii) Hard Disk

12. Rearrange the following memories in descending order depending on their speed. 2
Hard disk, RAM, Cache Memory, Registers

Hard disk, RAM, Cache Memory, Registers

13. Explain the various types of memories in a computer system. 4


Memory is classified into two
1. Primary Memory
2. Secondary Memory.

1. Primary Memory
Primary Memory is a semiconductor memory that is accessed directly by the CPU.
There are three types of primary memory.
a. Random Access Memory (RAM) - RAM refers to the main memory that microprocessor
can read from and write into. It is a volatile memory.
b. Read Only Memory (ROM) - ROM is a permanent memory that can perform only read
operations. ROM is non volatile.
c. Cache Memory - It is a small and fast memory between processor and RAM. Frequently
accessed data, Instructions and intermediate results etc are stored in cache.

2. Secondary Memory
Secondary memory is permanent in nature. It is larger than RAM, but slower. The secondary
memories are
a. Magnetic Memory – It uses plastic tape / plastic disks coated with magnetic materials.
Example – Magnetic Tape, Hard Disk
b. Optical Memory – It consists of an aluminum foil sandwiched between two circular plastic
disks. It uses low-powered laser beam to read and write data.
Example – CD, DVD, Blu-Ray
c. Semiconductor Memory – It uses EEPROM chips for data storage. They do not contain any
moving parts, so they are shock proof.

14. Write the following memory devices in the order of their speed. (Fastest to slowest order) : 2
(a) Cache (b) RAM (c) Hard Disk (d) Registers

(d) Registers (a) Cache (b) RAM (c) Hard Disk

15. Explain the features of any five input devices of a computer. 5


1. Light Pen – It is a pointing device used to draw directly on the screen. Used by Engineers,
Artists, Fashion designers etc
2. Joystick – Used to play video games. It has a vertical stick which can move in any direction.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

3. Microphone – It accepts sound as input and converts it into digital format.


4. Scanner – It is used to capture pictures or text and convert it into digital format.
5. Touch screen – Allows the user to make selections by touching on the display screen.

16. Write a short note about any three output devices. 3


1. Visual Display Unit (VDU) – Used to produce soft copy.
Example – LCD Monitors, LED Monitors
2. Printer – Used to produce Hard copy.
Example – Laser, Ink Jet, Thermal
3. Plotter – Used to produce hard copies of graphs and designs on paper.
----------------------------------------------------------------------------------

e-Waste
1. How e-Waste create environmental and health problems? 1
e-waste contains toxic substances such as mercury, lead etc which cause cancer and many other
health problems if not properly managed.

2. Define the term E-waste. Explain briefly about any two E-waste disposal methods. 3
e-Waste refers to electronic products nearing the end of their "useful life".
Reuse – It refers to second hand use or usage after modification or upgradation.
Recycling - It is the process of manufacturing new products from e-waste.

3. Name any four e-Waste disposal methods. 2


Reuse, Incineration, Recycling, Land filling

4. Which among the following is NOT a recommended method for e-waste disposal? 1
a) Reuse b) Incineration c) Land Filling d) Recycling

c) Land filling

5. Explain any three e-waste disposal methods. 3


Reuse – It refers to second hand use or usage after modification or upgradation.
Recycling - It is the process of manufacturing new products from e-waste.
Incineration – E-Waste is burned in incinerators at a high temperature.
------------------------------------------------------------------------------

Software
1. What is Operating System? Give two examples. 1
Operating System is a set of programs that acts as an interface between user and
hardware. It controls and co-ordinates the operations of the computer.
Ex. Microsoft Windows, Linux, Ubuntu, DOS

2. What are the major functions of operating system? 2


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Process management, Memory management, File management, Device management

3. What is a language processor? 2


Language Processor is a system software that translate programs written in Assembly
Language or High Level Language into Machine Language.

4. Name two different language processors which translate high level language program into
machine language program. 1
Compiler, Interpreter

5. Compare Compiler and Interpreter. 2


Compiler: Language processor that converts HLL program into machine language in a single run.
Interpreter: Language processor that converts HLL program into machine language line by line.

6. What is the use of an Assembler? 2


Assembler: Language processor that converts assembly language programs to machine language.

7. What is utility software? Give one example. 2


It is a set of programs which help users in system maintenance tasks.
Example – Antivirus Software

8. List different types of Utility software. 2


Compression tools, Disk defragmenter, Backup software, Antivirus software

9. Antivirus software is a /an ………………….. 1


a) Disk defragmenter b) Utility Software c) Application Software d) Operating System
b) Utility Software

10. What is meant by Antivirus software? 2


Antivirus software is a utility software that scans the computer for viruses and
removes them.
Example - Norton Antivirus, Kaspersky

11. List and explain various components of system software. 5


The components of System Software are
a. Operating System
b. Language Processors
c. Utility Software.

a. Operating System
It is a set of programs that acts as an interface between user and hardware. It controls and
co-ordinates the operations of the computer.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Ex. Microsoft Windows, Linux, Ubuntu, DOS

b. Language Processors.
Language Processors translate programs written in Assembly Language or High Level
Language into Machine Language.
Different types of Language Processors are
Assembler
Compiler
Interpreter

c. Utility Software
Set of programs which help users in system maintenance tasks.
Different types of Utility Softwares are
Compression tools
Disk Defragmenter
Backup Software
Antivirus software

12. Categorize the software given below into operating system, application package, and utility program.
Linux, OpenOffice Calc, Windows, WinZip, Kaspersky, OpenOffice Writer 2

Operating System – Linux, Windows


Application Package – Open Office Calc, OpenOffice Writer
Utility Program – WinZip, Kaspersky

13. Write a short note about any three utility software. 3


a. Compression Tools – This software is used to compress large files into small files.
b. Disk defragmenter – This program rearranges files in such a way that they are no longer
fragmented.
c. Backup software - This software facilitates the backing up of disk.
d. Antivirus software - This software scans the computer system for viruses and removed them.

14. Write an example for free and open Source Software. 1


GNU/Linux or GIMP or Mozilla Firefox

15. Which one of the following is NOT a free and open source software. 1
a) GNU/Linux b) MS Office c) GIMP d) Mozilla Firefox

b) MS Office

16. What do you mean by Freeware and Shareware 1


Freeware – software that anyone can download from the Internet and use for free.
Shareware – Software which gives users a chance to try it before buying it.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

17. Prepare a brief note about the following. 5


a) RAM b) QR code reader c) 3-D Printer d) Operating System e) Open Source Software

a. RAM - RAM refers to the main memory that microprocessor can read from and write into. It
is a volatile memory.
b. QR code reader - Used to read QR codes as well as Bar codes.
c. 3-D Printer – Used to print 3D objects.
d. Operating System - It is a set of programs that acts as an interface between user and hardware.
It controls and co-ordinates the operations of the computer.
e. Open Source Software – Free and Open Source Software gives the user the freedom to use,
copy, distribute, examine, change and improve the software.
--------------------------------------------------------------------------------------------------------------------

Chapter 4
Principles of Programming and Problem Solving

Phases in Programming
1. Name the steps involved in problem solving. 2
or
2. What are the different phases in programming? 3
a. Problem Identification
b. Preparing Algorithm and Flowchart
c. Program coding
d. Translation
e. Debugging
f. Execution and Testing
g. Documentation
------------------------------------------------------------------------------
Algorithm
1. What is an algorithm? 1
Finite sequence of instructions to solve a problem.

2. Write an algorithm to find the area of a circle. 2


Step 1 : Start
Step 2 : Input radius
Step 3 : Area = 3.14*radius*radius
Step 4 : Print Area
Step 5 : Stop

3. Write an algorithm to find the sum and average of three numbers. 2


Step 1 : Start
Step 2 : Input A,B,C
Step 3 : Sum=A+B+C
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Step 4 : Avg=Sum/3
Step 5 : Print Sum, Avg
Step 6 : Stop

4. Write an algorithm to check whether a given integer is even or odd. 2


Step 1 : Start
Step 2 : Input Num
Step 3 : If Num%2==0 Then
Step 4 : Print “Even”
Step 5 : Else
Step 6 : Print “Odd”
Step 7 : End of If
Step 8 : Stop

5. Write an algorithm to print the numbers upto 100 in reverse order. 2


Step 1 : Start
Step 2 : N=100
Step 3 : Repeat steps 4 and 5 While((N>0)
Step 4 : Print N
Step 5 : N=N-1
Step 6 : Stop
--------------------------------------------------------------------

Flowchart
1. Pick the odd one out and give a reason for your finding. 1

Answer is c)
It has one entry flow and two exit flows. All others have one entry flow and one exit flow.

2. In a flowchart, the symbol used for processing is _________. 1


rectangle.

3. What are the advantages of flow charts? . 3


Better communication
Effective Analysis
Effective Synthesis
Efficient Coding
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

4. What is the use of Rhombus symbol in flowchart? 1


Used as decision symbol. It indicates a point where a decision has to be made.

5. Draw a flow chart to compute average of three numbers. 2

Start

Input A,B,C

Avg=(A+B+C)/3

Print Avg

Stop

6. Draw a flow chart to find the area of a rectangle. 2

Start

Input L,B

Area=L* B

Print Area

Stop

7. Draw the flowchart to find the sum and average of three numbers. 3

Start
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Input A,B,C

Sum=A+B+C
Avg=Sum/3

Print Sum, Avg

Stop

8. Draw the flow chart for the following algorithm :


Step 1 : Start
Step 2 : Input A, B, C
Step 3 : S = A + B + C
Step 4 : Avg = S/3
Step 5 : Print S, Avg
Step 6 : Stop 3

Draw flowchart of Qn No 12.

9. Draw a flowchart to check whether the number is even or odd. 3

Start

Input N

Is Yes
N%2=0 Print “Even”
?
No

Print “Odd”

Stop
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

10. Draw a flowchart to check whether the given number is positive, negative or zero. 2

Start

Input N

Is Yes
N>0 Print “Positive”
?
No

Is
N>0 Yes
Print “Negative”
?

No

Print “Zero”

Stop

11. Use the proper symbols to complete the flowchart given below
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Start

Input H1, H2

Is Yes
H1>H2 Print H1
?
No

Print H2

Stop

12. Draw the flowchart for printing numbers 1 to 100. 3

13. a) Draw a flow chart for the following algorithm.


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

b) When we implement the above algorithm in C++, what will be the output? 3

a)

b) 1 2 3 4 5 6 7 8 9 10

14. Distinguish between Entry-Controlled loop and Exit-Controlled loop. 3


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

15. Classify the following loops into entry controlled loop and exit controlled loop for loop, while loop,
do while loop. 2
Entry Controlled Loop - for loop, while loop
Exit controlled loop - do while loop

Program Coding
1. Program written in HLL is known as .......… 1
Source code

2. Differentiate source code and object code. 2


Source code - Program written in a high level language.
Object code - Program converted into machine Language.

Debugging
1. The process of correcting errors in program is called ________. 1
Debugging

2. Distinguish between logical error and syntax error in a program. 2


Syntax Error – It occurs when rules/syntax of programming language are not followed.
Logical Error – It occurs due to improper planning of the program’s logic.

3. Which one of the following statements is INCORRECT?


a) Syntax error occurs due to violation of rules of the programming language.
b) Incorrect punctuation is an example of syntax error.
c) Language processors detect syntax error during translation.
d) Language Processors translates source code into machine code even if syntax error is present
in the program. 1

Answer is d)

Documentation
1. Which phase in programming contains preparation of user, system manual and writing comments
in program. 1
Documentation

2. Write the different types of program documentation with their importance. 3


There are two types of program documentation.
a. Internal Documentation
b. External Documentation
Writing comments in the source code (program) is known as Internal Documentation. It helps
the debugging process and program modification at a later stage.
Preparation of user manual and system manual is known as External Documentation. These are
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

hard copy documents that contain functioning of the system, its requirements etc.

3. Some of the components in the phases of programming are given below. Write them in order of their
occurrence :
(i) Translation (ii) Documentation (iii) Problem identification (iv) Coding of program
(iii) Problem identification (iv) Coding of program (i) Translation (ii) Documentation
--------------------------------------------------------------------------------------------------------------------------

Chapter 5
Introduction to C++ Programming
Character Set
1. Write short note on character set of C++. 2
A character represents any letter, digit or any other symbol. The set of valid characters in a
language is known as its character set.
The character set of C++ are
a. Letters - A-z, a-z
b. Digits - 0-9
c. Special Characters - +,*,(,) etc
d. White spaces – Space bar, Tab
e. Other Characters – any of the 256 ASCII characters

Tokens
1. Fundamental building blocks of the program is called ________. 1
Tokens

2. What is meant by tokens? Name the tokens available in C++. 2


Fundamental building blocks of the program is called Tokens. Token of C++ are
a. Keywords
b. Identifiers
c. Literals
d. Operators
e. Punctuators

3. Explain about any three types of tokens used in C++. 3


a. Keywords – Tokens that convey specific meaning to the compiler.
Example : int. char
b. Identifier - User defined words used to name different program elements.
Example : sum, avg
c. Literals - Tokens that never change their value during the program run.
Example : 50, ‘A’, 3.14, “C++”
d. Operators – A symbol that tells the compiler about a specific operations
Example : +, *, >
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

e. Punctuatore – Special symbol that have syntactic or semantic meaning to the compiler.
Example : #, ;

4. Identify and classify tokens in the following C++ statement.


cout<<"The Missile Man”; 2

cout – identifier
<< - Operator
“The Missile Man” - Literal
; - Punctuator

Identifiers
1. Write the rules followed for naming an identifier. 2
Should includes only letters, digits and underscores.
First character must be a letter or underscore.
White space and special characters are not allowed.
Keywords can not be used.
Uppercase and lowercase letters are treated differently.

2. Find the invalid identifier from the following:


A1, d-w, 999, qwA, Z$, AaA1, 8c 2

d-w - hyphen (special character) is used


999 - first character is digit
Z$ - special character is used
8c - first character is digit

3. Identify invalid identifiers and write reason.


A, a@b, 4f, Abc, int, var1 3

a@b - Special character is used.


4f - First character is digit.
int - Keyword

4. Identify the invalid identifiers from the following and write reason for that :
A20bc, if, 5sum, adm_no, student age, classno 3

if - Keyword
5sum - First character is digit
student age - Space is not allowed

5. Find the invalid identifier names from the following : 2


A1, d-w, 999, qwA, Z$, AaAl, 8c
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

d-w, 999, Z$, 8c

Literals
1. What is meant by Literals in C++ ? Explain its types.
Data items that never change their value during the program run is called literals.
Literals are divided in to four types. They are
a. Integer Literals – whole numbers without fractional part. Eg.100
b. Floating point Literals – Numbers with fractional part. Eg. 3.14
c. Character Literals – A character within single quotes. Eg. ‘A’, ‘9’
d. String Literals – A sequence of one or more characters within double quotes.
Eg. “ABC”, “100”

2. Write any three escape sequence with its function. 3


Escape sequences are representation of non-graphic symbols of C++. It consists of a backslash
(\) followed by one or more characters.
Example : ‘\n’ - New Line
‘\t’ - Horizontal tab
‘v’ - Vertical Tab
‘\0’ - Null Character

3. Identify the invalid literals and write the reason.


a) 2E3.5 b) “9” c) ‘hello’ d) 55450 2

a) 2E3.5 - Exponent must be an integer


c)’hello’ - string literal should be enclosed within double quotes.

4. Differentiate between character and string literals. 2


Character literal - A single character enclosed in single quotes.
Example- ‘A’, ‘5’, ‘?’

String literal - A sequence of one or more characters enclosed within a pair of double quotes.
Example - “123”, “Hello friends”
-------------------------------------------------------------------------------------------------------------------------------

Chapter 6
Data Types and Operators
C++ Data types
1. What are the fundamental data types in C++? 2
int, char, float, double, void

2. Briefly explain about fundamental data types in C++. 3


Fundamental data types are data types defined in C++ compiler. They are int, char, float, double
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

and void.
a. int – Used to represent integer numbers. Integers are whole numbers without fractional part. GCC
compiler allocates 4 bytes of memory for int data type.
Example : 100, -50, +10, 0
b. char – Used to represent characters. GCC compiler allocates 1 byte of memory for char data type.
Example : ‘A’, ‘+’, ‘5’
c. float – Used to represent floating point numbers. Floating point numbers are numbers with
fractional part. GCC allows 4 bytes of memory for float data type. It has a precision of 7 digits.
Example : 3.14
d. double – Used to represent floating point numbers with more precision. GCC allows 8 bytes of
memory for double data type. It has a precision of 15 digits.
e. void – Represents empty set of data. It does not require any memory.

3. The datatype does not require any memory space is _________. 1


void

4. The memory size of ‘double’ data type in C++ is _________ bytes. 1


8 bytes

Type Modifiers
1. What are the data type modifiers in C++? 2
signed, unsigned, long, short

Operators
1. A _________ operator, operates on a single operand. 1
unary

2. Describe about Relational Operators in C++. 3


Relational operators are used for comparing numeric data. The result of any relational operation
will be either True or False. In C++, True is represented by 1 and False is represented by 0.
There are six relational operators in C++. They are < (less than), > (greater than), == (equal to),
<= (less than or equal to), >= (greater than or equal to) and != (not equal to).
Example: 10>5 result is 1
10<5 result is 0

3. Write the logical operators of C++ with its symbols. 2


Logical AND (&&)
Logical OR (||)
Logical NOT (!)

43. !, ++, %, == are operators used in C++. Categorize them into Arithmetic, Relational, logical and
increment operators. 2
Arithmetic - %
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Relational - ==
Logical - !
Increment - ++
5. Write the value returned by the following C++ expression if x=10 and y=20. 3
a) x>15 || y>15;
b) x>15 && y>15;
c) !(x>y)

a) 1 b) 0 c) 1

6. Write the symbols of the following C++ operators. 2


a) Conditional operator
b) Extraction operator
c) Increment operator
d) NOT operator

a) ? : b) >> c) ++ d) !

7. Write the use and syntax of the following operators in C++ 2


(a) Conditional operator (? :)
(b) Size of operator

a) Expression1 ? Expression2 : Expression3


b) sizeof (datatye) / sizeof(variablename) / sizeof(constant)

Expressions
1. Describe three types of C++ expressions with an example. 3
An expression is composed of operators and operands. On the basis of the operators used,
expressions are mainly classified into
a. arithmetic expressions
b. relational expressions
c. logical expressions.
a. Arithmetic expressions
An expression in which only arithmetic operators are used is called arithmetic expression. The
operands and results are of numeric data.
Example : 5+4 result is 9
b. Relational expressions
An expression in which only relational operators are used is called relational expression. The
operands are numeric data. The result will be True (1) or False (0).
Example : 5>4 result is 1
5<4 result is 0
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

c. Logical expressions
An expression in which only logical operators are used is called logical expression. The
operands are relational expressions. The result will be True (1) or False (0).
Example: (5>4)&&(10>5) result is 1
!(5>4) result is 0

Type Conversion
1 . Briefly explain different types of type conversions in C++. 3
There are two types of conversions.
a. Implicit conversion (Type promotion)
b. Explicit conversion ( Type casting)
In expressions where different types of data are involved, C++ compiler converts the lower
sized operands to the data type of highest sized operand. It is known as type promotion.
Type casting is done by the programmer . This is done by specifying the data type within
parenthesis to the left of the operand.

2. What is type promotion in C++? 2


Type promotion (Implicit type conversion) is performed by C++ compiler internally. In
expressions where different types of data are involved, C++ converts the lower sized operands to
the data type of highest sized operand. It is also known as type promotion.
Example: 3+2.5
In the above expression, the operands are of different data types – int and float. So int will be
converted to float and the expressions will become 3.0+2.5 and the result will be 5.5

3. Consider the following C++ statement. 2


b=5+a/2;
What will be the value of b if a=9.
a. when a is integer (int)
b. when a and b are float.

a. 9
b. 9.5

Statements
1. Briefly discuss about the different types of statements in C++. 3
Statements are the smallest executable unit of a programming language. Different types of
statements used in C++ are
a. declaration statements
b. assignment statements
c. input statements
d. output statements
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

a. Declaration statements
Declaration statements are used to declare variables.
Syntax
data_type variable;
Here data_type – any valid C++ data type.
Variable – variable name (identifier)
Example : int sum;

b. Assignment statements
The assignment statement is used to assign a value to a variable.
Syntax
variable = constant
or
variable1 = variable2
or
variable = expression
Example : x=10;
x=y;
x=a+b;

c. Input statements
Input statement is used to input a value from keyboard to a memory location.
Syntax
streamobject >> variable;
Example
cin >> num;

d. Output statements
Output statement is used to output a value from RAM to output device.
Syntax
streamobject << data;
Example
cout << num;
cout << "hello friends";
cout << num+12;

2. What do you mean by cascading of I/O operators in C++? 3


The multiple use of input or output operators in a single statement is called cascading
of I/O operators.
Examples: cin>>x>>y>>z;
cout<<x<<y<<z;
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Structure of a C++ Program


1. Write the basic structure of a C++ program. 3
#include<header file>
using namespace identifier;
int main()
{
statements;
……………..;
……………..;
return 0;
}

The first line is preprocessor directive.


The second line is namespace statement.
The third line is function header. It is followed by a set of statements.

2. Briefly explain the three components in the structure of a C++ program. 3


The three components in the structure of a C++ program are
a. Preprocessor directives
b. namespace statement
c. main() function header

a. Preprocessor directive
A C++ program starts with Preprocessor directives. These are compiler directive
statements. It give instruction to the compiler to process the information provided before actual
compilation starts. These lines starts with the symbol #.
Example : #include, #define (#include is used to link header files in C++ library.)
Header files contain information about functions, objects etc.
Example: iostream – contains the information about the objects cin and cout.

b. namespace statement
Different identifiers are associated to a particular namespace. The keyword using tells
the compiler about a namespace where it should search for elements in a program.

c. main() function header


Every C++ program consists of a function called main(). The execution starts at main()
and ends within main().
The function header main() is followed by its body. It is a set of statements.

3. What is the importance of main() function in C++ ? 2


The execution of a C++ program starts at main() and ends within main(). Other
functions are called from main().
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

4. Name any two preprocessor directives in C++. 1


#include, #define

5. The file name extension of C++ program is ____________. 1


.cpp

6. The following C++ code segment is a part of a program to find the average of 3 numbers.
int a,b,c;
float avg;
cin>>a>>b>>c;
avg=(a+b+c)/3;
cout<<avg;

What will be the output if the inputs are 1,4 and 5? How can you correct it? 2

The output is 3.
change 3 into 3.0

7. Write the output of the following C++ program 2


#include<iostream>
using namespace std;
int main()
{
int a=1, b=2, c=3;
cout<<a+b+c/3;
cout<<”\n”;
cout<<(a+b)%c;
}

The output is 4
0

Guidelines for coding


1. Describe the different types of comments used in C++ with example. 3
Comments are lines in code that are added to describe the program. There are two
ways to write comments in C++:
i. Single line comments
ii. Multiline comments
Single line comment: The characters // (two slashes) is used to write single line comments.
Multiline comments: Anything written within /* and */ is treated as comment so that the comment
can take any number of lines.
----------------------------------------------------------------------------------------------------------------
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Chapter 7
Control Statements
Decision Making Statements
1. Write the syntax of ‘if’ statement. 2
if(test expression)
{
statement block;
}

2. Write the syntax of if..else statement. 2


if(test expression)
{
statement block 1;
}
else
{
statement block 2;
}

3. Give an example of Nested if statement. 2


cout<<"Enter your score ";
cin>>score;
if (score >= 18)
cout<<"You have passed";
if(score >= 54)
cout<<" with A+ grade !";
else
cout<<"\nYou have failed";

4. Using _________ statement, we can replace several if statements. 1


if..else if ladder

5. Write down an example for multiple branching switch statement. 3


cout << "Enter a number between 1 and 7: ";
cin >> day;
switch (day)
{
case 1: cout <<"Sunday"; break;
case 2:cout <<"Monday"; break;
case 3: cout <<"Tuesday"; break;
case 4:cout <<"Wednesday"; break;
case 5: cout <<"Thursday"; break;
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

case 6:cout <<"Friday"; break;


case 7: cout <<"Saturday"; break;
default: cout <<"Wrong Input";
}
}

6. Consider the following if else if statement. Rewrite it with switch statement. 2


if (a==1)
cout ≪ “One”;
else if (a==0)
cout ≪ “Zero”;
else
cout ≪ “Not a binary digit”;

switch(a)
{
case 1 :cout ≪ “One”; break;
case 0 :cout ≪ “Zero”; break;
default :cout ≪ “Not a binary digit”;
}

7. Compare switch and if else if ladder statements used in C++. 2

------------------------------------------------------------------------
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Conditional Operator
1. Explain about conditional operator. 2
Conditional operator is a ternary operator. It requires three operands to operate. Its symbol is
‘?:’. It can be used as an alternative to if..else statement.

2. Read the following C++ statement and rewrite using if..else. 2


(a>b) ? cout<<a : cout<<b;

if(a>b)
cout<<a;
else
cout<<b;

3. Rewrite the following statement using if..else. 2


k=(a>b) ? a-b : b-a;

if(a>b)
k=a-b;
else
k=b-a;
-----------------------------------------------------------------------------

Iteration Statements
1. Explain looping statements in C++. 3
Looping statements allow a set of instructions to be executed repeatedly when a condition is
True. C++ provides three loop statements: while loop, for loop and do...while loop.
All the loops have four components. They are Initialisation of loop control variable, Test
Expression, Body of the loop and Update statement.
Loops can be entry-controlled (while, for) or exit-controlled (do..while).

2. Write the names of any two entry controlled loops available in C++. 2
while, for

3. Name the type of loop which can be used to ensure that the body of the loop will surely be 1
executed at lest once.
do..while

4. What are the three looping or iteration statements in C++? Briefly explain about any one loop 3
with an example.
The three looping statements are while loop, for loop and do...while loop.

while statement
The while loop is an entry-controlled loop. The condition is checked first and if it is found
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

True, the body of the loop will be executed.


#include <iostream>
using namespace std;
int main()
{
int n = 1;
while(n <= 10)
{
cout << n << " ";
++n;
}
}

5. Write the syntax of ‘for’ statement used in C++. 2


for (initialisation; test expression; update statement)
{
body-of-the-loop;
}

6. Write the syntax or an example of do while loop. 3


Syntax
initialisation of loop control variable;
do
{
body of the loop;
Updation of loop control variable;
} while(test expression);

Example
#include <iostream>
using namespace std;
int main()
{
int n=1;
do
{
cout << n << " ";
n++;
}while(n<=10);
}
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

7. Compare for, while and do-while loops. 5

8. Write an output of the following C++ statements. 1


int p=1;
for(int n=-5; n<=5; n++)
p=p*n;
cout<<p;
a) 25 b) 0 c) -25 d) None of these

b) 0

9. Rewrite the following program using while and do ........ while loops. 3
#include<iostream>
using namespace std;
int main()
{
int i;
for (i=1;i<=10; i++)
{
cout<<i;
}
return 0;
}

using while
int main()
{
int i;
i=1;
while(i<=10)
{
cout<<i;
i++;
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

}
return 0;
}

using do..while
int main()
{
int i;
i=1;
do
{
cout<<i;
i++;
} while(i<=10);
return 0;
}

10. What will be the output of the following program. Justify your answer. 2
#include<iostream>
using namespace std;
int main()
{
int a, b num;
for(a=1; a<=10; ++a)
{
for(b=1; b<=5; ++b)
num=a*b;
cout<<num<<endl;
}
return 0;
}

5
10
15
20
25
30
35
40
45
50
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

In the inner loop, there is no brackets. So compiler assumes that there are two
statements – a for loop and a cout statement. So the product of ‘a’ value and 5 (the final value of
variable b is displayed.

11. Draw the flow chart for the execution of do... while loop in C++. 3

12. Write C++ code fragments to print the numbers from 1 to 10 using an exit or entry 3
controlled loop.
#include <iostream>
using namespace std;
int main()
{
int n = 1;
while(n <= 10)
{
cout << n << " ";
++n;
}
}

13. Which one of the following is NOT an iteration statement in C++? 1


a) while b) continue c) for d) do..while

b) continue

14. What are the four elements of a C++ loop ? 2


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

initialisation expression
test expression
body of the loop
update expression

Jump Statements
1. Which statement in C++ can transfer control of a program to a labelled statement? 1
goto

2. What is the use of jump statement in a program? Explain the different types of jump statements 5
available in C++.
The statements that transfer the program control from one place to another is called Jump
statements. In C++ there are four jump statements. They are return, goto, break and continue.
return
The return statement is used to transfer control back to the calling program.

goto
The goto statement transfer the program control to anywhere in the program.
Syntax
goto label;
............;
............;
label: ..........;
............;
where label is an identifier.

Example:
int i=1;
start: cout<<i;
++i;
if (i<=50)
goto start;

If the test expression (i<=50) evaluates to true, the program control gors back to label start.

break
break statement takes the program control outside the loop or switch statement.
Example:
for(int i=1; i<=5; i++)
{
if i==3)
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

break;
cout<<i<<”\t”;
}

Output: 1 2

continue
continue statement skips a part of the code and forces the next iteration.
Example:
for(int i=1; i<=5; i++)
{
if i==3)
continue;
cout<<i<<”\t”;
}

Output: 1 2 4 5

3. Explain any three jump statements with examples. 3


Refer the above question.

4. Consider the code given below and predict the output. 1


for(int i=1; i<=9; i=i+2)
{
if(i==5) continue;
cout<<i<<“ “;
}

12346789

5. Differentiate ‘break’ and ‘continue’ statement in table form. 2

break continue
Used with switch and loops Used only with loops
takes the program control outside the loop or skips a part of the code and forces the next
switch statement. iteration.
Program control goes out of the loop even though Program control goes out of the loop only when
the test expression is True. the test expression becomes False.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Programs
1. Write a program to check whether the given number is prime or not. 5
#include<iostream>
using namespace std;
int main()
{
int num,i;
cout<<"Enter a number ";
cin>>num;
for(i=2;i<num/2;i++)
{
if(num%i==0)
{
cout<<num<<" is not a Prime Number";
exit(0);
}
}
cout<<num<<" is a Prime Number";
return 0;
}

2. Write a program to check whether the given number is palindrome or not. 5


#include <iostream>
using namespace std;
int main()
{
int num, copy, digit, rev=0;
cout<<"Enter the number: ";
cin>>num;
copy=num;
while(num != 0)
{
digit = num % 10;
rev = (rev * 10)+ digit;
num = num/10;
}
cout<<"The reverse of the number is: "<<rev;
if (rev == copy)
cout<<"\nThe given number is a palindrome.";
else
cout<<"\nThe given number is not a palindrome.";
return 0;
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

3. Write a program to print the leap years between 2000 and 3000. 5
#include<iostream>
using namespace std;
int main()
{
int year;
for(year=2000;year<=3000;year++)
{
if(year%400==0||year%4==0)
cout<<year<<"\t";
}
return 0;
}

4. Write a C++ program that accepts a list of integers as input and print sum of even integers. 5
#include<iostream>
using namespace std;
int main()
{
int N,num,i,sum=0;
cout<<"How many numbers? ";
cin>>N;
cout<<"Enter numbers ";
for(i=0;i<N;i++)
{
cin>>num;
if(num%2==0)
sum=sum+num;
}
cout<<"Sum = "<<sum;
return 0;
}
--------------------------------------------------------------------------------------------------------------------

Chapter 8
Arrays
Array and its need
1. What is an Array? Explain its need. 2
An array is a collection of elements of the same type placed in contiguous memory locations.
In situations where large data of same type is to be handled, large number of variables are to be
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

declared and operated. In such situations arrays are used.

2. Write C++ statement to declare an array which can store 5 integer values and explain about the
memory allocation of the array. 3
int num[5];
For this integer array, the total bytes of memory allocated
= sizeof (array_type) × size_of_array
=4x5
= 20 bytes.

3. Illustrate the memory allocation for a single dimensional array in C++. 2

int num[10];

4. How many bytes are required to store the following arrays?


int b[25]; 1

total bytes = 4 x 25
= 200 bytes.

5. Write the initialization statement for an array with values 89, 75, 92, 65. 2
int x[4]={89,75,92,65};

6. In C++, the array index starts with _____ . 1


0

7. Find the value of score[4] based on the following declaration statement.


int score[5]={98, 87, 92, 79, 85}; 1

85

8. What is meant by Index in an array? Explain its role in accessing array elements. 3
Any element in an array can be accessed by giving the array’s name and the element’s position.
This position is called the index or subscript value. In C++, the array index starts with zero. If an
array is declared as int num[10]; then the possible index values are from 0 to 9. The first element can
be referenced as num[0] and the last element as num[9].

9. An array is declared as follows


int a [5] = {1, 2, 3, 4, 5};
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

What will be the value of a[2] + a[3] ? 1


a) 7 b) 5 c) 6 d) 4

a) 7

10. (i) An array is declared as follows :


int a[5] = {1, 2, 3, 4, 5};
What will be the value of a[2]+a[3] ? 1
(ii) How many bytes are allocated by the above array in memory ? 1

(i) 7
(ii) 4 x 5 = 20 bytes

Array Operations
1. Accessing the elements of an array at least once is called ______. 1
Traversal

2. Write a short note on traversal operations in array. 3


Accessing each element of an array at least once to perform any operation is known as
traversal operation. If any operation is performed on all the elements in an array, it is a case of
traversal.
Example:
#include<iostream>
using namespace std;
int main()
{
int mark[5]={80,56,38,90,86};
int i;
for(i=0;i<5;i++)
cout<<mark[i]<<” “;
return 0;
}

3. Write C++ statements to double each element of the array int A[100]. 2

(for int i=0;i<100;i++)


A[i]=A[i]*2;

Sorting
4. Write an algorithm for selection sort. 3
Step 1 : Start
Step 2 : Accept N as the number of elements of the array
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Step 3 : Accept N elements into the array AR


Step 4 : Repeat Steps 5 to 9, (N – 1) times
Step 5 : Store the first element, in MIN and its position in POS
Step 6 : Repeat Step 7 until the last element of the list
Step 7 : Compare the next element with the value of MIN. If it is found smaller, store it in MIN
and its position in POS
Step 8 : If the first element in the list and the value in MIN are not the same, then swap the first
element with the element at position POS
Step 9 : Revise the list by excluding the first element in the current list
Step 10 : Print the sorted array AR
Step 11 : Stop

5. 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. 3

initial list
24 54 89 56 76 42 5

After Pass 1
5 54 89 56 76 42 24

After Pass 2
5 24 89 56 76 42 54

After Pass 3
5 24 42 56 76 89 54

After Pass 4
5 24 42 54 76 89 56

After Pass 5
5 24 42 54 56 89 76

After Pass 6
5 24 42 54 56 76 89

6. Write algorithm for bubble sorting. 3


Step 1 : Start
Step 2 : Accept N as the number of elements of the array
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Step 3 : Accept N elements into the array AR


Step 4 : Repeat Steps 5 to 7, (N - 1) times
Step 5 : Repeat Step 6 until the second last element of the list
Step 6 : Starting from the first position, compare two adjacent elements in the list. If they are
not in proper order, swap the elements.
Step 7 : Revise the list by excluding the last element in the current list.
Step 8 : Print the sorted array AR
Step 9 : Stop

7. Describe bubble sort method. 3


Bubble sort works by repeatedly comparing each pair of adjacent items and swapping them
if they are in the wrong order. This passing procedure is repeated until no swaps are required.
Example: 3, 7, 1, 2, 6.
Initial List
3 7 1 2 6

Pass 1
3 7 1 2 6

3 1 7 2 6

3 1 2 7 6

3 1 2 6 7

Pass 2
1 3 2 6 7

1 2 3 6 7

1 2 3 6 7

Pass 3
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

1 2 3 6 7

1 2 3 6 7

Pass 4

1 2 3 6 7

Searching
6. Consider an array A with the following elements sorted in ascending order.
5, 9, 10, 13, 16, 17, 19, 20, 25, 37
Explain the working of binary search algorithm to search 25. How many comparisons are required
for this searching? 3

0 1 2 3 4 5 6 7 8 9
5 9 10 13 16 17 19 20 25 37

FIRST = 0, LAST = 9
MIDDLE = (FIRST + LAST) / 2 = (0+9) / 2 = 4.5 = 4
LIST[4] = 16 which is not equal to 25.

LIST[4] is less than 25. So FIRST = MIDDLE + 1


=4+1
=5
MIDDLE = (FIRST + LAST) / 2 = (5 + 9) / 2 = 14/2 = 7
LIST[7] = 20 which is not equal to 25

LIST[7] is less than 25. So FIRST = MIDDLE + 1


= 7+1
=8

MIDDLE = (FIRST + LAST) / 2 = (8 + 9) / 2 = 17/2 = 8.5= 8


LIST[8] is equal to 25.

Only 3 comparisons are required.

7. Write the algorithm for Linear Search. 3


Step 1. Start
Step 2. Accept a value in N as the number of elements of the array
Step 3. Accept N elements into the array AR
Step 4. Accept the value to be searched in the variable ITEM
Step 5. Set LOC = -1
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Step 6. Starting from the first position, repeat Step 7 until the last element
Step 7. Check whether the value in ITEM is found in the current position. If found then store
the position in LOC and Go to Step 8, else move to the next position.
Step 8. If the value of LOC is less than 0 then display "Not Found", else display the value of
LOC + 1 as the position of the search value.
Step 9. Stop
8. Compare Linear search with Binary search. 2

Two Dimensional Arrays


1. Illustrate the concept of two dimensional arrays. 2
A two dimensional array is an array in which each element itself is an array.

2. How many bytes are required to store the following arrays?


int a[[2][5]; 1

total_bytes = sizeof (base type) × number of rows × number of columns


=4x2x5
= 40 bytes

2. Write C++ statements to find the sum of the diagonal elements of array M[5][5]. 2
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

sum=0;
for(i=0; i<5; i++)
{
sum = sum + M[i][i];
}
cout<<"\nSum of major diagonal elements is: " <<s;
--------------------------------------------------------------------------------------------------------------------

Chapter 9
String Handling and I/O functions

Memory Allocations for Strings


1. Which character is used to delimit the string in memory? 1
\0 or Null Character

2. What is the use of NULL character in strings ? 2


NULL character is used as the string terminator and added at the end automatically. Thus the
memory required to store a string will be equal to the number of characters in the string plus one
byte for null character.

3. How many bytes are required to store the string “WELCOME ALL”? 1
12

4. Distinguish the memory allocation of the following initialization statements. 2


char name[10]=”TOM”;
char name[]=”TOM”;

In the first statement 10 memory locations will be allocated and the string will be stored with
null character as the delimiter. The last six bytes will be left unused.
But for the second statement, size of the array is not specified and hence only 4 bytes will be
allocated (3 bytes for the string and 1 for '\0' ).

I/O Operations on Strings


1. Name the character function used to accept a string including white space. 1
gets()

2. Name the header file required if the elements of the array are to be printed using puts( ) function. 1
<cstdio>

3. What is the advantage of using gets() function in C++ program to input string data? Explain with
an example. 2
If “cin” is used to input a string that contains a space, only the word before space will be
inserted into the array. This is because a white space is treated as a separator of data.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

The gets() function is used to accept a string including white spaces from the standard input
device (keyboard).

4. Consider the following C++ program.


#include<iostream>
using namespace std;
int main()
{
char str[20];
cin>>str;
cout<<str;
}

5. What will be the output if we input the string "Vande Mataram”. Justify your answer. 2

The answer is Vande.


A white space is treated as a separator of data. Thus, the input Vande Mataram is
treated as two data items, Vande and Mataram separated by white space. Since there is only one
input operator ( >> ) followed by a variable, the first data (i.e., Vande) is stored.

6. Consider the following statements. 2


char name [20];
cin>>name;
cout<<name;
What will be the output if you input the string "GREEN COMPUTING"? Justify Your answer.

The answer is GREEN.


A white space is treated as a separator of data. Thus, the input GREEN COMPUTING is
treated as two data items, GREEN and COMPUTING separated by white space. Since there is only
one input operator ( >> ) followed by a variable, the first data (i.e., GREEN) is stored.

Console functions for character I/O


1. String function ‘getchar( )’ is defined in ________ header file. 1
<cstdio>

2. Write and explain about any two functions defined in cstdio header file. 3
getchar() - This function returns the character that is input through the keyboard.
Eg: char ch = getchar();

putchar() - This function displays the character given as the argument on the monitor.
Eg: putchar(ch);
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Stream functions for I/O Operations


1. Name two input stream functions in C++. 1
get(), getline()

2. Write any two stream functions for I/O operations in C++. 2


get(), getline(), put(), write()

3. What is the use of function ‘get()’ in C++ ? 2


get() - This function is used to accept a single character or multiple characters (string) through
the keyboard.
Example :
char ch, str[10];
cin.get(ch); //accepts a character and stores in ch
cin.get(str,10); //accepts a string of maximum 10 characters

4. Differentiate between put() and write() with an example. 3


put() - It is used to display a character constant or the content of a character variable given as
argument.
Example:
char ch='c';
cout.put(ch); //character 'c' is displayed
cout.put('B'); //character 'B' is printed

write() - This function displays the string contained in the argument.


Example:
char str[10]="hello";
cout.write(str,10);

5. Predict the output of the following C++ statements : 1


char str[10]=“hello”;
cout.write(str,4);

hell

6. Explain about any three stream functions used in C++. 3


Refer Qns 3 and 4

Miscellaneous
1. Write the use of the following string function in c++. 1
a. gets() b. getline() c. write()

a. gets() - Refer Question 3 of I/O Operations on Strings


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

b. getline() - This function is used to accepts a string through the keyboard.


Example :
char ch, str[10];
int len;
cin.getline(str,len);
c. write() - Refer Question 4 of Stream functions for I/O Operations
---------------------------------------------------------------------------------------------------------------

Chapter 10
Functions
Concept of Modular Programming
1. Describe the merits of modular programming. 3
Reduces the size of the program: The modular approach helps to isolate the repeating task
and write instructions for this with a name. This can be invoked by using that name. Thus program
size is reduced.
Less chances of error: When the size of the program is reduced, naturally syntax errors will be
less in number. The chances of logical error will also be minimized.
Reduces programming complexity: If we divide the problem into smaller conceptual units
properly, the development of logic for the solution will be simpler.
Improves reusability: A function written once may be used later in many other programs.

2. Write any four merits of modular programming. 2


Reduces the size of the program
Less chances of error
Reduces programming complexity
Improves reusability
----------------------------------------------------------------------

Predefined functions
1. Name the built in function to check whether a character is alphanumeric or not. 1
isalnum()

2. To check an alphabet is lowercase, _________ function is used. 1


islower()

3. To find the number of characters in a string _________ function is used. 1


strlen()

4. To append one string to another string, ________ function is used. 1


strcat()

5. List any four C++ mathematical functions. 2


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

abs(), sqrt(), pow()

6. Predefined function sqrt() is defined in _________ header file. 1


<cmath>

7. To include a mathematical built in functions in a C++ program, we should include ________ 1


header file.
<cmath>

8. List any three string functions in C++ and specify the value returned by them. 3
a. strlen() - This function is used to find the length of a string. It returns the number of
characters in a string.
b. strcmp() - This function is used to compare two strings.
The function returns any of the following values in three different situations.
Returns 0 if string1 and string2 are same.
Returns a –ve value if string1 is alphabetically lower than string2 .
Returns a +ve value if string1 is alphabetically higher than string2 .
c. strcmpi() - This function is used to compare two strings ignoring cases.
The function returns any of the following values in three different situations.
Returns 0 if string1 and string2 are same.
Returns a –ve value if string1 is alphabetically lower than string2.
Returns a +ve value if string1 is alphabetically higher than string2.

9 Compare strcmp() and strcmpi(). 2


strcmp() - This function is used to compare two strings.
strcmpi() - This function is used to compare two strings ignoring cases.

10. Write the syntax and use of following functions in c++. 3


a) strcpy() b) pow() c) islower()

a. strcpy() - This function is used to copy one string into another.


Syntax - strcpy(string1, string2);
where string1 and string2 are array of characters or string constants.
b. pow() - This function is used to find the power of a number.
Syntax - double pow(double, int)
c. islower() - This function is used to check whether a character is in lower case (small letter)
or not.
Syntax - int islower(char c)

11. Correct the program and write the output. 2


#include<iostream>
using namespace std;
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

int main()
{
char str[] = “Green Computing”;
int n;
n=strlen(str);
cout<<n;
return 0;
}

Corrected Program.
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char str[] = “Green Computing”;
int n;
n=strlen(str);
cout<<n;
return 0;
}

Output – 15

12. Correct the program and write the output. 2


#include<iostream>
using namespace std;
int main ()
{
int n=25;
float b=sqrt(n);
cout<<b;
return 0;
}

Corrected Program.
#include<iostream>
#include<cmath>
using namespace std;
int main ()
{
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

int n=25;
float b=sqrt(n);
cout<<b;
return 0;
}

Output - 5
--------------------------------------------------------------------------------

User defined functions


1. Explain User Defined Functions. 3
C++ provides the facility to create our own functions for some specific tasks. Such sub
programs are called user-defined functions.
Syntax:
data_type function_name(argument_list)
{
statements in the body;
}

where data_type – data type of the value returned by the function. any valid data type of C++.
function_name - user-defined word (identifier).
argument_list - which is optional, is a list of parameters
body - C++ statements

2. Write a short note about the following C++ statement : 2


int sum(int,int);

This is a function declaration statement. The function name is ‘sum’. It accepts two
integer values as arguments. It returns an integer value.

3. What do you mean by argument of a function? Explain formal arguments. 2


Arguments or parameters are the means to pass values from the calling function to the called
function.
The variables used in the function definition as arguments are known as formal arguments.

4. What are the arguments of a function ? 2


Arguments or parameters are the means to pass values from the calling function to the called
function. There are two types of arguments.
a. formal argument
b. actual argument

5. Explain the difference between call by value method and call by reference method with the help
of examples. 3
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

a. Call by value (Pass by value) method


In this method, a copy of the actual argument is passed to the function. Hence, if the formal
argument is modified within the function, the change is not reflected in the actual argument at the
calling place.
Example :
void change(int n)
{
n = n + 1;
cout << "n = " << n << '\n';
}
int main()
{
int change()
change(x);
cout << "x = " << x;
}

Output - n = 21
x = 20

b. Call by reference (Pass by reference) method


When an argument is passed by reference, the reference of the actual argument is passed to the
function. So, if the formal argument is modified within the function, the change will be reflected in
the actual argument
Example :
void change(int & n)
{
n = n + 1;
cout << "n = " << n << '\n';
}
int main()
{
int x=20;
change(x);
cout << "x = " << x;
}

Output - n = 21
x = 21

6. Compare two function calling methods in C++. 3


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

7. Construct the function prototypes for the following functions :


(i) The function Display( ) accepts one argument of type double and does not return any value. 1
(ii) Total( ) accepts two arguments of type int, float respectively and return a float type value. 1

(i) void Display(double);


(ii) float Total(int, float);

Scope and life of variables and functions


1. Variable which can be used anywhere in a program is called _______. 1
Global variable

2. Explain the scope of variables in a c++ program. 3


Scope of a variable is that part of the program in which it is used. In C++, a variable can have
two scopes.
a. Local Scope
b. Global Scope
Local Scope – When a variable is declared within a function or a block, it has local scope. This
variable will be available only within that function or block.
Global Scope - When a variable is declared outside all the functions, it has global scope. This
variable will be available at any place in the program.

3. Differentiate between global and local variables. 2


Local Variable – A variable declared within a function.
Global Variable – A variable declared outside all the functions.

4. Distinguish between global variable and local variable. 2


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

------------------------------------------------------------------

Recursive functions
1. The process of calling a function by itself is known as ____________ 1
recursion

2. Read the function definition given below. Predict the output, if the function is called as convert(7) 2
void convert(int n)
{
if(n>1)
convert(n/2);
cout<<n%2;
}

Output - 111

3. Write a recursive C++ function that returns sum of the first n natural numbers. 2
int sumnatural(int x)
{
if(x==1)
return 1;
else if(x>1)
return(x+sumnatural(x-1));
}
-------------------------------------------------------------------------------------------------------------------------

Chapter 11
Computer Networks
Need for Network
1. Explain the advantages of forming networked computers than keeping stand-alone computers. 3
a. Resource sharing - The sharing of hardware and software resources in a computer network
is called resource sharing.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

b. Price-performance ratio - The cost of purchasing licensed software for each computer can
be reduced by purchasing network versions.
c. Communication - Computer network helps user to communicate with any other user of the
network through services like e-mail, chatting, video conferencing etc.
d. Reliability - It is possible to backup data/information in multiple computers using the
network. These can be retrieved from other computers in case of disasters.
e. Scalability - Computing capacity can be increased or decreased easily by adding or
removing computers to the network

Some key terms


1. What is meant by Bandwidth of a Network ? 2
Bandwidth describes the maximum data-transfer rate between computers in a network. In
digital systems, bandwidth is measured in bits per second (bps).

2. Any device which is directly connected to a network is generally known as ________. 1


Node

Communication medium
1. Which one of the following transmission media carry information in the form of light signals? 1
a) coaxial cable b) shielded twisted pair cable c) optical fibre cable d) Wi-fi
c) optical fibre cable

2. Write short notes about any three communication channels or mediums. 3

a. Twisted pair cable (Ethernet cable)


This is the most widely used media in small computer networks. It consists of four
twisted pairs which are enclosed in an outer shield.
b. Coaxial cable
A coaxial cable consists of an inner conductor surrounded by a tubular insulating
layer which is further covered by a tubular conducting shield. It has an outer insulation to protect the
cable too.
c. Optical fibre cable
Optical fibres are long thin glass fibres through which data is transmitted as light signals.

Wireless communication technologies using radio waves


1. Expand Wi-Fi. 1
Wireless Fidelity

2. Write short notes on. 3


a) Bluetooth b) Wi-Fi c) Satellite

Bluetooth – This technology is used for short range wireless communication.


Wi-Fi - Wi-Fi is used to transmit information across a network like cell phones etc.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Satellite - Satellite is used in long distance wireless communication.

Data communication devices


1. Different networks with different protocols are connected by a device called ________. 1
Gateway

2. Write short note about the following


a) NIC b) Hub c) Switch d) Repeater e) Bridge
f) Router g) gateway

a) NIC - NIC enables a computer to connect to a network and communicate.


b) Hub - Hub is used in a wired network to connect computers of the same network. The
hub transmits the incoming packets to all other computers connected to it.
c) Switch - A switch is an intelligent device. It connects computers of the same network. The
switch transmits the incoming packets to the destination computer only.
d) Repeater - Repeater receives incoming data signals, amplifies the signals to their original
strength and retransmits them to the destination.
e) Bridge - A bridge is a device used to segmentise a network. An existing network can be
split into different segments and can be interconnected using a bridge.
f) Router - A router is a device that can interconnect two networks of the same type using
the same protocol.
g) Gateway - A gateway is a device that can interconnect two different networks having
different protocols.

3. Discuss the difference in working methods of hub and switch. 2


Hub - Hub is used in a wired network to connect computers of the same network. The hub
transmits the incoming packets to all other computers connected to it.
Switch - A switch is an intelligent device. The switch transmits the incoming packets to the
destination computer only.

Data terminal equipments


1. An electronic device used for communication between computers through telephone line is _____ 1
Modem

2. Explain the functions of the following network devices. 5


a) Modem d) Multiplexer

a. Modem
A modem is an electronic device used for communication between computers
through telephone lines. It converts digital signals received from a computer to analog signals
(modulation) for telephone lines. It also converts the analog signals received from telephone
lines to digital signals (demodulation) for the computer.
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

b. Multiplexer
Multiplexing is sending multiple signals on a physical medium at the same time
and then recovering the separate signals at the receiving end.
Multiplexing divides the physical medium into different frequency channels. Multiplexer
combines (multiplexes) the inputs from different sources and sends them through different channels
of a medium. At the destination, a demultiplexer separates (demultiplexes) the signals and sends
them to destinations.

Network topologies
1. In ........ network topology, each node is directly connected to a hub/ switch. 1
Star Topology

2. Define network topology. Explain about the four major topologies. 5


The way in which the nodes are physically interconnected to form a network is called a
Topology. Major topologies are bus, star, ring and mesh.

Bus Topology

In bus topology all the nodes are connected to a main cable called bus. If a node has to
send data to another node, it sends data to the bus. The signal travels through the entire length of the
bus. All nodes check the bus, and only the node for which data is addressed accepts it.

Star Topology
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

In star topology each node is directly connected to a hub/switch. If any node has to send some
information to any other node, it sends the signal to the hub/switch. This signal is then
broadcasted (in case of a hub) to all the nodes but is accepted only by the intended node. In the case
of a switch, the signal is sent only to the intended node.

Ring Topology

A ring topology is in the form of a circle. Data travels only in one direction. While they
are passed from one node to the next, each node regenerates the signal. The node for which the
signal is intended reads the signal. After travelling all the nodes, the signal reaches back to the
sending node from where it is removed.

Mesh topology

In mesh topology, every node is connected to other nodes. So there will be more than
one path between two nodes. If one path fails, the data will take another path and reach the
destination.

Types of networks
1. Internet is an example of __________. 1
WAN

2. Compare any three types of networks based on span of geographical area. 3


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

On the basis of the area covered, computer networks are classified as:
a) PAN - Personal Area Network
b) LAN - Local Area Network
c) MAN - Metropolitan Area Network
d) WAN -Wide Area Network

a. PAN
PAN is a network that can cover an area of a few meters.
Example : PC to MP3 player.
b. LAN
LAN is a network that can cover an area of a few meters to a few Kilometers. A LAN is
owned, controlled and managed by a single person or an organisation.
Example : Network in a room, building or a campus.
c. MAN
MAN is a network that can cover an area of a few Kilometers to a few hundred
Kilometers (within a city). MAN is typically owned and operated by a single entity such as a
government body or a large corporation.
Example : Cable TV connection in a city.
d. WAN
WAN is a network crossing the limits of a city, country or continent. It can cover an area
of over hundreds of Kilometers in radius.
Example : Internet, A network of ATMs, banks, government offices spread over a country, continent.

3. Specify the type of network given below.


ATM network, Cable Television network, Network within school, Network at home using 3
bluetooth, Telephone network, Railway network.

ATM network – WAN


Cable Television Network - MAN
Network within school - LAN
Network at home using bluetooth - PAN
Telephone Network - WAN
Railway network - WAN

Logical classification of networks


1. What is peer-to-peer network. 2
A peer-to-peer network has no dedicated servers. Any computer can act as a client or
as a server at any instance. This network is ideal for small networks like home network or small
business establishments or shops.

Identification of computers over a network


1. Write a short note about the following : 5
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

(b) MAC (e) IP

Media Access Control (MAC) address


A Media Access Control (MAC) address is a universally unique address (12 digit
hexadecimal number) assigned to each NIC (Network Interface Card) by its manufacturer.
MAC addresses are usually written in one of the following two formats:
MM : MM : MM : SS : SS : SS
or
MM – MM – MM – SS – SS – SS
The first half (MM:MM:MM) of a MAC address contains the ID number of the NIC
manufacturer. The second half (SS:SS:SS) of a MAC address represents the serial number assigned
to the NIC by its manufacturer.
Example: 00:A0:C9:14:C8:35

Internet Protocol (IP) Address


An IP address is a unique 4 part numeric address assigned to each node on a network.
Each part is a number within the range 0 to 255. IP address is assigned to each machine by the
network administrator or the Internet Service Provider.
Example : 148.78.250.12

Network protocols
1. Define protocol. 1
A network protocol is a set of rules to be followed when devices in the network exchange
data with each other.

2. Write the name of a network protocol. 1


TCP/IP, HTTP, FTP, DNS

3. Write short notes about HTTP 1


HTTP stands for Hypertext Transfer Protocol. It is a standard protocol for transferring
requests from client-side and to receive responses from the server-side.

4. Write the full form of TCP/IP. 1


Transmission Control Protocol / Internet Protocol

Uniform Resource Locator (URL)


1. URL stands for ____________. 1
Uniform Resource Locator

2. What is the use of URL in computer networks? 1


URL is used used to identify a network resource on the Internet.

3. Explain the format of URL with an example. 3


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

URL is divided into three parts.


a) Network protocol
b) Domain name
c) File name
Example : Consider the URL http://www.dhsekerala.gov.in/index.html
protocol - http
domain name - www.dhsekerala.gov.in
file name - index.html
--------------------------------------------------------------------------------------------------------------------

Chapter 12
Internet and Mobile Computing

History of the Internet


1. ________ is considered as first wide area network in the world. 1
ARPANET

Types of connectivity
1. Compare the DiaI up connection and Wired broadband connection. 3

2. What is FTTH ? Explain its merits. 2


Fibre To The Home (FTTH) uses optical fibers for data transmission. Since optical fibres have
high bandwidth and low error rates, they provide very high speed connectivity.

3. Write a short on WiMax. 2


Wi-MAX offers a Metropolitan Area Network. Connectivity is provided using devices that have
a Wi-MAX modem integrated in it. This technology provides a maximum connection speed of upto
70 Mbps.

3. Briefly explain about any two internet access sharing methods. 3


Using LAN - The Internet connected to a computer in a Local Area Network (LAN) can be
shared among other computers in the network.
Using Wi-Fi network - Wi-Fi is a popular short distance data transmission technology. Internet
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

can be accessed in Wi-Fi enabled devices like laptops, tablets, mobile phones, etc. through
hotspots. A drawback of Wi-Fi is that it is less secure than wired connections.

Services on Internet
1. Name any two services over internet. 2
World wide web, Search engines, E-mail, social media
2. Explain about Search Engines. 3
Search engine programs search documents on World Wide Web for specified keywords and
return a list of the web pages matching the keywords.
Example : Google, Bing, Yahoo Search, Ask
Search engine web sites use programs called web crawlers or spiders or robots to search the web.
Web crawlers search the web pages stored in the different web servers and find possible keywords.
The search engine website stores these keywords along with their URLs to form an index in the web
servers.

3. What is an e-mail? Describe structure of an e-mail with suitable example. 3


Electronic mail or e-mail is a method of exchanging digital messages between computers over
Internet.
The structure of an e-mail address is:
user name@domain name.
Example : [email protected]

4. Susheel’s email id is [email protected]. He sends an email to Rani whose email id is


[email protected]. How is the mail sent from Susheel’s computer toRani’s computer? 3
When an e-mail is sent from Susheel’s computer, it reaches the e-mail server of his e-mail service
provider. From there the message is routed to the Rani’s e-mail server. The Rani’s e-mail server then
delivers the e-mail to the Rani’s mail box (inbox).

5. Describe the advantages of Email. 3


Speed - An e-mail is delivered instantly to any location across the globe.
Easy to use - We can send, receive, organise and save e-mail easily on our computer.
Provision of attachments – This feature allows to send pictures, files, documents, etc along
with e-mail.
Environment friendly - e-mails do not use paper, thus save a lot of trees.
Reply to an e-mail – When replying to an email, we can use the provision of attaching previous
e-mails as reference.
Cost-effective - When compared to fax or conventional mail, e-mail is less expensive.

6. What are the major classifications of Social Media? 3


Internet forums, Social Blogs, Microblogs, Wikis, Social Networks, Content communities.

7. Write the advantages of social media. 2


Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Bring people together, Plan and organise events, Business promotion, Social skills.

8. Write any two limitations in use of social media. 2


Intrusion to privacy, Addiction, Spread rumours

Cyber Security
1. Find the best matches from the given definitions for the terms in the given list. 2
(Worm, Hacking, Phishing, Spam)
a) Unsolicited emails sent indiscriminately.
b) A technical effort to manipulate the normal behavior of networked computer system.
c) A stand-alone malware program usually makes the data traffic slow.
d) Attempt to acquire information like usernames and passwords by posing as the original
web site.
e) Appear to be a useful software but will do manage like deleting necessary files.

Worm - c) A stand-alone malware program usually makes the data traffic slow.
Hacking - b) A technical effort to manipulate the normal behavior of networked computer
system.
Phishing - d) Attempt to acquire information like usernames and passwords by posing as the
original web site.
Spam - a) Unsolicited emails sent indiscriminately.

2. Which one of the following terms refers to ethical hacker? 1


a) Black hat b) Blue hat c) Grey hat d) White hat
c) Grey hat

3. What is meant by Phishing ? 3


Phishing is an attempt to acquire information such as usernames, passwords and credit
card details by posing as the original website. Phishing websites have home pages similar to their
original ones. The act of creating such a misleading website is called spoofing.

4. Name any four common threats that affect a Computer Network. 2


Computer Virus, Worm, Trojan Horse, Spams, Hacking, Phishing

5. Write a short note on Computer Virus. 2


A computer virus is a program that attaches itself to another program or file. It spread
from one computer to another without our knowledge and interferes with the normal operation of a
computer.

Preventing Network Attacks


1. What is firewall? 2
A firewall is a system of computer hardware and software that provides security. It analyses
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

incoming data and determines whether they should be allowed or not based on a rule set.

2. What is the role of Firewall and Anti-virus scanner in computer networks? 3


A firewall is a system of computer hardware and software that provides security. Firewalls deny
malicious data from entering into the computer networks.
Antivirus software scans files in the computer system for known viruses and removes them if
found.
3. What is ‘quarantine’ ? 2
When an antivirus program finds a malware, it stops the file from running, and puts it into
‘quarantine’. Quarantine is a special area for storing files infected with viruses.

Mobile Communication
1. SIM card is a smart card used inside a mobile phone. What is the full form of SIM? 1
Subscriber Identity Module

Mobile Operating System


1. Name any four Mobile Operating Systems. 2
Android, iOS, BlackBerry OS and Windows Phone

Miscallaneous
1. Write a short note about : 3
(a) Fibre to Home (FTTH) (b) Phishing (c) Android Operating system

(a) Fibre to Home (FTTH) – Its a wired broadband connectivity. It Uses optical fibers for data
transmission. They provide very high speed connectivity.
(b) Phishing - Phishing is an attempt to acquire information such as usernames, passwords and
credit card details by posing as the original website.
(c) Android Operating system - Android is a Linux-based operating system designed mainly for
touch screen mobile devices such as smart phones and tablet computers.

2. Pick the odd one from the following list :


(i) Spam (ii) Trojan horse (iii) Phishing (iv) Firewall
(iv) Firewall

You might also like