0% found this document useful (0 votes)
9 views

2 PUC Computer Notes(2024)Final Copy (2)

Uploaded by

faadideathsmash
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

2 PUC Computer Notes(2024)Final Copy (2)

Uploaded by

faadideathsmash
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 241

Updated

onwards

Click below link to download Notes & Lab Manual….


www.gkmvkalyan.blogspot.com
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 1 of 240

www.gkmvkalyan.blogspot.com Page 1
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 2 of 240

www.gkmvkalyan.blogspot.com Page 2
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 3 of 240

www.gkmvkalyan.blogspot.com Page 3
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 4 of 240

www.gkmvkalyan.blogspot.com Page 4
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 5 of 240

www.gkmvkalyan.blogspot.com Page 5
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 6 of 240

UNIT-A

www.gkmvkalyan.blogspot.com Page 6
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 7 of 240

Chapter 1: Typical Configuration of Computer system

One Mark MCQ’s Question and Answer.

1. Which among the following is directly accessed and manipulated by


the CPU during program execution

a.DDR-SDRAM b. Internal-Cache c. Primary memory d. Registers

2.Which among the following is known as CPU’s working memory.

a. Internal Cache b. Primary Memory

c. Register d. External Cache

3.Which among the following is referenced by the CPU without


address during instruction execution

a.CD-ROM b. Primary Memory

c. Port d. Registers

4. Which component of computer co-ordinates overall functioning of


various units the computer.

a. ALU b. CU c. Registers d. North Bridge

5. The primary memory of a computer consists of

a. Only RAM b. Only ROM c. Both RAM and ROM d. Flash drives

6. Which of the following is not a secondary memory?

a. Magnetic Tape b. Hard disk c. Optical Disk d. Cache memory

7. Which among the following is a large printed circuit board having


many chips, ports, controllers and other electronic components mounted
on it

a. Integrated Circuit b. Motherboard c. Chip set d. Firewire

8. Which among the following represents characteristics of


motherboard.

www.gkmvkalyan.blogspot.com Page 7
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 8 of 240

a.only form factor b.only Chip set c.Only Processor Socket d. All the
above

9. Which one of the following not represented by form factor

a. Geometry b. Electrical requirements

c. Dimensions d. Coordinating data transfer

10. Which of the following characteristic of motherboard should be


considered to maximize the computers upgradability

a.Form Factor b. Chip set c. Processor socket d. All from (a) to (c)

11. Which of the following motherboard model has no ports

a.AT b. ATX c. XT d. Baby AT

12. Pentium -I, Pentium-II and Pentium – MMX processors used in


type of motherboards

a.AT b. ATX c. XT d. Baby AT

13. Pentium -III Processors are used in type of motherboards

a.AT b. ATX c. XT d. Baby AT

14. Both Pentium III and Pentium IV processors are suported by


motherboards

a.XT b. AT c. Baby AT d. ATX

15. Processors supported by ATX mother board are

a. Only Pentium-IV, Dual Core


b. Only Dual Core and Core 2 Duo
c. Quad Core, i3, i5 and i7
d. All of the above

16. Which among the following motherboards have slot type and PGA
type processor sockets

www.gkmvkalyan.blogspot.com Page 8
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 9 of 240

a. ATX motherboard
b. Baby AT motherboard
c. XT motherboard
d. AT motherboard

17. Choose the component not present in Baby AT motherboard


a. Slot type processor sockets and PGA processor sockets
b. SDRAM slots and DDRRAM slots
c. PCI slots and ISA slots
d. AGP slots

18. Which one of the following has 24-pin Power connector


a. AT motherboard
b. Baby AT motherboard
c. XT motherboard
d. ATX motherboard

19. XT motherboard has power pin connectors

a. 24 b. 12 and 20 c. 20 d. 20 and 24

20. MPGA processor sockets are found in type of motherboards

a. Baby AT b. ATX c. AT d. XT

21. Choose the very old motherboard model from the following
a. ATX b. XT c. Baby AT d. AT

22. Choose the correct answer from the following

a. MPGA type of processor socket is found in ATX motherboard


b. LIF processor socket is not found in XT mother boards
c. PGA type of processor socket is not found in AT motherboards
d. Both slot type and PGA processor sockets are not found in Baby AT
motherboard

23. One of the following motherboard type consists of AGP

a. AT motherboard
b. Baby AT motherboard
c. ATX motherboard
d. XT motherboard

www.gkmvkalyan.blogspot.com Page 9
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 10 of 240

24. One of the following is the main component of the motherboard

a. BUS b. BIOS c. CMOS d. Processor

25. ----------------is the frequency with which a processor executes


instructions.

a. Bus speed b. Clock speed c. MHz d. GHz

26. The computers operating speed is linked to the speed of ------------

a. BUS b. Memory access c. System Clock d. North Bridge

27. In operating the System Properties dialog box is selected to see


the processor name and clock frequency

a. Android b. Solaris c. Windows d. Linux

28. CPU’s performance is measured by the per second

a. Number of instructions decoded


b. Number of instructions loaded
c. Number of instructions executed
d. Number of programs executed

29. CPU built on a single IC chip is known as--------------

a. multiprocessor
b. graphic processor
c. microprocessor
d. microcomputer

30________establishes a communication path for movement of data


between processor and memory

a. Cache b. Bus c. motherboard d. North Bridge

31. Which one of the following is the alternative name for North Bridge

a. Host Bridge b. LPC c. North Chipset d. Both (a) and (c) are correct

32. North Bridge manages data communication between


a. Memory and Hard Disk
www.gkmvkalyan.blogspot.com Page 10
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 11 of 240

b. External devices and Memory


c. CPU and motherboard
d. Keyboard and RAM

33. The most common motherboard standard for desktop computers


a.AT b. ATX c. XT d.Baby ATX

34. Identify the devices which are not managed by North Bridge
a. RAM b. CPU c. Video cards d. CD ROM drive

35 chipset manages data communication between low speed


components

a. North Bridge b. South Bridge c. IDE d. SATA

36. Which of the following performs POST


a. CMOS b. BIOS c. Control unit d. ALU

37. Identify operation which are not part of BIOS


a. Holds instructions to load hardware settings
b. Performing POST
c. Invoking bootstrap loader
d. Storing date and time

38. Invoking boostrap loader is done by


a.BIOS b. CMOS c. SMPS d. South Bridge

39 is a type of memory chip to store the date, time and system setup
parameters.

a. BIOS b. CMOS c. RAM d. ROM

40. BIOS and CMOS are powered by battery kept on the motherboard
a. Lithium Ion b. Sodium Ion
b. Magnesium ion d Silicon Ion

41. PC cards are used in computers


a.Desktop b. Mini c. Smart Phones d. Laptop

42 Which among the following bus is the fastest


a. ISA b. PCI c. AGP d. PCI Express

43. Which one of the following is correct with respect to original


Pentium motherboard

www.gkmvkalyan.blogspot.com Page 11
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 12 of 240

a. It has two 72-pin SIMM slots or one 168-pin DIMM slots


b. It has only four 72-pin SIMM slots
c. It has only two 168-pin DIMM slots
d. It has four 72-pin SIMM slots or two 168-pin DIMM slots

44. Disk controller is a circuit that enables communication between CPU


and

a. Hard Disk
b. Floppy Disk
c. Any External disk drive
d. All of the above

45. IDE standard drive is a wired ribbon


a. 24 b. 40 c. 32 d. 16

46 _____is a plug and play interface


a. Serial port b. parallel port
c. USB d. AGP port

47. Number of devices supported in USB is -------------------


a. 64 b. 127 c. 128 d. 63

48. What is the basic speed of USB ------------


a. 12 Mbps b. 8 Mbps c.16 Mbps d. 32 Mbps

49. Port use synchronous serial signals to communicate between the


keyboard and a mouse
to the computer.
a. AGP b. COM c. USB d. PS/2

50. Secondary memory is also known as?


a) Second pass memory b) Dynamic memory
c) Auxiliary memory d) Temporary memory

51. Which of the following are the two main components of the CPU?
a). Control Unit and Registers b). Registers and Main Memory
c). Control unit and ALU d). ALU and bus

52. Personal computers used a number of chips mounted on a main


circuit board. What is the common name for such boards?
a). Daughterboard b). Motherboard c). Father board d). Child board

53. What is the Expansion of ISA?


a) Industrial Standard Architecture b) International Standard

www.gkmvkalyan.blogspot.com Page 12
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 13 of 240

Architecture
c) Industrial Standard Auxiliary device d) International standard advice

54. ALU means


a). Arithmetic Logic Unit b). Array Logic Unit
c). Application Logic Unit d). None of above

55. VGA is
a). Video Graphics Array b). Visual Graphics Adapter
c) Visual Graph Array d) Visual Gate Array

56. UPS stands for:


a) Universal Power Supply b) Uninterrupted Power Supply
c) Universal Power system d) Uninterrupted power System

57. What is Cache Memory?


a) High speed memory b) volatile Memory
c) Low speed memory d) Escape memory

58. How many bits of data are transferred in serial port?


a) One bit b) Two bits c) three bits d) four bits

59. Use of modem.


a) Modulates and demodulates signals b) emits the signals
c) Synchronizes the signals d) transfers the unwanted bits

www.gkmvkalyan.blogspot.com Page 13
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 14 of 240

One Mark Questions and Answers.

1) What is Motherboard?
The motherboard is the main Printed Circuit Board (PCB) inside a
computer which provides a platform for all the components and
peripherals to communicate with each other.

2) What is microprocessor?

Microprocessor is a single integrated circuit chip that function as


computer CPU.

3) What is the purpose of register in the CPU?


CPU uses registers for the processing of data

4) How does the computer communicate with other devices?


Every component inside the computer has to communicate through
the motherboard, either by directly plugging into it or by
communicating through one of the motherboard ports.

5) What is bus?
A bus is a collection of parallel wires that form a pathway to carry
address, data and control signals.

6) What is system bus?


The bus which connects major computer components like,
processor, memory and Input/output is called as System bus.

7) What is Data bus?


Data bus provides a path to transfer data between CPU and
memory. The data bus may consist of 32, 64, 128 lines of wire.

8) What is Address bus?


Address bus connects CPU and RAM with a set of lines of wire
similar to data bus.

9) What is control bus?


Control bus is used to control and co-ordinates the various parts of
the computer.

www.gkmvkalyan.blogspot.com Page 14
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 15 of 240

10) What is a Port?


The ports are used to connect external input and output devices to
motherboard.

11) What is an interface?


The ports and interfaces are used to connect external devices like
printers, keyboards or scanners to the computer, which gets
connected to the computer’s motherboard.

12) Expand PCI?


PCIPeripheral Component Interconnector.

13) What is cache memory?


The Cache memory is a high speed memory available inside CPU
to speed up access of data and instructions stored in RAM memory.

14) How many bits of data are sent in a serial port?


One bit.
15) Name any one USB device.
pen drive, memory card readers.

16) Expand USB.


Universal Serial Bus

17) Give one feature of USB port.


USB is a plug- and-play, it interfaces between a computer and add-
on devices.

18) What is meant by plug and play device?


A new device can be added to the computer without adding
an adapter card or even turning the computer off.

19) Where is L1 cache located?


L1 cache is in built with the processor it is also called processor
resident cache.

20) Where is L2 cache located?


L2 cache is on the motherboard it is also called motherboard
resident cache.

www.gkmvkalyan.blogspot.com Page 15
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 16 of 240

21) Expand SDRAM.


SDRAM-Synchronous Dynamic Random Access Memory

22) Give the expansion of DDRRAM.


DDRRAM-Double Data Rate Random Access Memory

23) Expand SMPS.


SMPS- Switched mode power Supply

24) What is the use of SMPS?


An SMPS converts AC power from an electrical outlet to the DC
power needed by system components.

25) What is the approximate power consumed by a PC?


Converts 230 volts of AC to 5 to 12 DC volts and the watts is
around 180 to 300 watts, 450 watts and 500 watts.

26) Name the power supply connected to a computer system.


They are Switch Mode Power Supply (SMPS) and Uninterruptable
Power Supply (UPS).

27) Expand UPS.


UPS- Uninterruptable Power Supply.

28) What is the use of UPS?


An Uninterruptable Power Supply (UPS) is a power supply that
includes a battery to maintain power in the event of a power failure
or any electrical problems like power line problems, power outages,
under voltage or lightening.

29) List the types of UPS.


The two types of UPS are Online UPS and Standby UPS.

30) Give the purpose of expansion slots?


An expansion slot is a socket on the motherboard that is used to
insert an expansion card (or circuit board), which provides
additional features to a computer such as video, sound, advanced
graphics, Ethernet or memory.

www.gkmvkalyan.blogspot.com Page 16
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 17 of 240

31) Define the clock speed of the CPU.


The clock speed of a CPU is defined as the frequency with which a
processor executes instructions or the data that is processed.

Expand
PCI-Peripheral Component Interconnect.
BIOS-Basic Input Output System.
SCSI- Small Computer System Interface.
USB- Universal Serial Bus.
MIDI- Musical Instruments Digital Interface.
CMOS-Complementary Metal Oxide Semiconductor memory.
UPS-Uninterruptable Power Supply.
DRAM: Dynamic Random Access Memory
SRAM: Static Random Access memory
SDRAM: Synchronous Dynamic Random Access Memory
DDR-SDRAM: Double-Data Rate Synchronous Dynamic Random
Access Memory
AGP-Accelerated Graphics Port.
VGA-Visual Graphics Adaptor.
DVI- Digital Video Interface.
ISA- Industry Standard Architecture.
SIMM-Single Inline Memory Module.
DIMM-Dual Inline Memory Module.
POST-Power on Self Test.

www.gkmvkalyan.blogspot.com Page 17
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 18 of 240

Three Mark Questions and Answers.

1. Explain the different components of motherboard.


a. The Processor or CPU: Processor is the main component on the
motherboard and is called brain of the computer. The CPU consists
of Arithmetic Logic Unit (ALU), Control Unit (CU) and Registers.

b. BIOS (Basic Input Output System): BIOS is a small chip on the


motherboard that holds a set of instructions to load the hardware
settings required to active various devices like keyboards, monitors
or disk drives. BIOS performs the POST(Power On Self Test), that
checks the presence of hardware devices and are functioning
properly.

c. CMOS (Complementary Metal Oxide Semiconductor): CMOS is a


lithium battery provides the power supply to a motherboard to keep
the required information when the system is off. The information
includes system date, system time and system set up parameters.

d. Slots: An expansion slot is an opening in a computer where you


can insert in a printed circuit board. It is used to insert an
expansion card, which provides additional features to a computer.

e. Disk Controllers: Disk controller is the circuit which enables the


CPU to communicate with the hard disk, floppy disk or other kind of
disk drives.

f. Bus: A bus is a collection of parallel wires that form a pathway to


carry address, data and control signals.

g. Ports: Port is a connector used to connect external devices like


keyboard, printer, scanner etc., to the computer.

www.gkmvkalyan.blogspot.com Page 18
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 19 of 240

2. Explain the characteristics of motherboard.


The different characteristics of motherboard are as follows
a) The form factor: It is the specification of motherboard explains
the dimensions, power supply type, location of mounting holes,
number of the ports on the back panel, etc.

b) A chipset: It is a collection of microchips (such as a CPU, BIOS,


Memory, mass storage, interfaces, controllers and input-output
devices) designed with built-in circuits on motherboard to work
together to perform specific functions.

c) Processor socket: It is a place where CPU is connected. It is


designed as per the compatibility of the CPU and the
motherboard.

3. Explain serial port.


a) It is also known as COM (Communication) ports.
b) It is used to connect devices like mouse and modem.
c) It transfers data serially one bit at a time through a single wire.
d) Two types of COM ports are 9 pin port and 25 pin ports.
e) It supports bi-directional data flow.

4. Explain Parallel port.


a) It is also called LPT (line printer terminal) port.
b) Parallel ports reserved for printers and some types of external
storage devices.
c) It transfers data parallel 8 bits of data at a time.
d) The signals in parallel port do not travel far.
e) It supports unidirectional data flow.

www.gkmvkalyan.blogspot.com Page 19
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 20 of 240

5. Explain the types of motherboard


The various types of motherboards are XT, AT, Baby AT and ATX.

XT Motherboard:
1. XT motherboard: XT stands for eXtended Technology. These
are old model motherboard. In this motherboard we have slot type
processors, ISA slots, 12 pin power connector and no ports.
Ex: Pentium I, Pentium II Processors.

2. AT motherboard: AT stands for Advanced Technology. They


have PGA (Pin Grid Array) socket, SDRAM slots, 20 pin power
connector, PCI slots and ISA slots.
Ex: Pentium III processors

3. Baby AT motherboard: They are the combinations of XT and


AT. They have slot type processor sockets and PGA processor
sockets, SDRAM and DDRRAM slots, PCI slots and ISA slots, 12 and
20 pin power connectors and ports.
Ex: Pentium III and Pentium IV processors.

4. ATX motherboard: ATX stands for Advanced Technology


eXtended. Latest motherboard is called as ATX motherboards. They
have mPGA(micro Pin Grid Array) processor sockets, DDRRAM slots,
PCI slots, AGP slots, 20 and 24 pin ATX power connectors and ports.
Ex: Pentium IV, Duel core, Core 2 duo, Quad core, i3, i5 and i7
processors

www.gkmvkalyan.blogspot.com Page 20
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 21 of 240

6. Explain the Schematic diagram of Motherboard.

The north bridge or host bridge is one of the two chips in the core
logic chipset on a PC motherboard, used to manage data
communications between the CPU and motherboard.
North Bridge or north Chipset is responsible for control of high
speed components like CPU, RAM, and Video Card.

www.gkmvkalyan.blogspot.com Page 21
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 22 of 240

South Bridge or south Chipset is similar as north chipset, but the


south bridge driver chipset components slower as: Sound Card, Net
Card, hard disk, CD ROM drive, USB port, SIO and BIOS IC etc.
BIOS (Basic Input Output System): BIOS is a small chip which
contains the startup instructions for the computer. BIOS performs
the POST(Power On Self Test).

CMOS (Complementary Metal Oxide Semiconductor): CMOS is a


lithium battery provides the power supply to a motherboard to keep
the required information when the system is off. The information
includes system date, system time and system set up parameters.

Slots: An expansion slot is an opening in a computer where you can


insert in a printed circuit board. It is used to insert an expansion
card, which provides additional features to a computer.

Ports: Port is a connector used to connect external devices like


printers, scanners etc, to the computer.

www.gkmvkalyan.blogspot.com Page 22
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 23 of 240

7. Explain the different types of input output ports.


Port is a connector used to connect external devices like keyboard,
printer, scanner etc., to the computer.
Types of port
a) Serial port: serial port is also called as COM ports. It is called as
serial port because it transfer one bit of data at a time serially. It
used to connect the external device like mouse, modem, pen
drive, older printer and other small devices.
b) Parallel port: Parallel port is called as LPT port (Line Printer port)
because it is used to connect different types of printers to the
computer. It transmits 8 bit of data at a time, hence movement
of data is faster.
c) USB (Universal Serial Bus) port: USB is a plug and play device.
Used to connect any external devices to the computer. using USB
127 devices can be added to the computer.
d) AGP port Accelerated graphics port -Used to connect graphics
card that provides high speed video performance especially
required in games and other multimedia application.
e) VGA port- Visual graphics adaptor port. -Used to connect monitor
to computer’s video card.
f) SCSI (Small Computer System Interface) port is used for adding
external devices such as high-speed hard disks, high-end
scanners and CD-ROM drives.

8. Write the functions for data bus, address bus and control bus.
Data bus: Data bus provides the path to transfer data and
instructions between CPU and Memory.
Address bus: Address bus connects CPU and RAM, which carries
address of the data in the memory to store and retrieve the data.
Control bus: Control bus carries control signals sent from CPU to
different parts of the computer.

www.gkmvkalyan.blogspot.com Page 23
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 24 of 240

9. Give the features of USB port.


a) These are plug n play devices.
b) It supports up to 127 devices.
c) It can also be used for power transmission.
d) It supports a data speed of 12 mbps.

10. Explain cache memory.(OR)


What is cache memory? Explain their types.
A cache memory is a high speed memory placed between RAM and
CPU.
Cache memory is used to store most recently accessed data and
programs.
Cache memory is very expensive.

Types of Cache Memory:


L1 (Level 1) is located in CPU.
L2 (Level 1) is located in motherboard.
L3 (Level 3) is Located on the mother board as a separate chip.

11. What is Expansion slot? Explain any four types of slots of


Motherboard.
An expansion slot is an opening in a computer where you can insert
a printed circuit board. It is used to insert an expansion card, which
provides additional features to a computer.

www.gkmvkalyan.blogspot.com Page 24
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 25 of 240

i) ISA (Industry Standard Architecture) : ISA slot is used to connect


modem and input devices.
ii) PCI (Peripheral Component Inter connect) : PCI slots are used to
connect graphics accelerator cards, sound cards, internal modem.
They are much faster than ISA cards.
iii) PC- Card: it is used in laptop computers. It includes Wi-Fi card,
network card and external modem.
iv) RAM slot- RAM slot is used to install memory and is of two
types. They are SIMM (Single Inline Memory Module) slot and
DIMM (dual Inline Memory Module) slot.
V) AGP (Accelerated Graphic Port) slot – AGP slot is meant to
provide faster access to a graphics accelerator card, thus enhancing
the visual experience for the user.
Vi) Processor slot – Processor slot is used to insert the processor
chip which is the largest chip on the motherboard.

12. Define (a) North Bridge (b) South Bridge


North Bridge is connected directly to the CPU and is thus
responsible for tasks that require the highest performance. It is
responsible for control of high speed components like CPU, RAM,
and Video Card.
South Bridge it manages the basic forms of input/output such as
USB, serial audio, Integrated Drive Electronics(IDE) and Industry
Standard Architecture(ISA) in a computer. It is slower than the
north bridge.

13. Name the different components of North bridge.


North Bridge or north Chipset is responsible for control of high
speed components like CPU, RAM, and Video Card.

www.gkmvkalyan.blogspot.com Page 25
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 26 of 240

14. Explain the types of power supply.


There are two types of power supply connected to a computer
system are Switch Mode Power Supply (SMPS) and Uninterruptable
Power Supply(UPS).
SMPS
SMPS converts AC power from an electrical outlet into DC power
needed for computer components.
UPS
An UPS is a power supply that includes a battery to maintain power
in the event of a power failure or electrical problems like power line
problems, under voltage.

15. What is the function of UPS? Mention different types of UPS.(OR)


What is the purpose of UPS? Mention different types of UPS.
UPS is Uninterruptible Power Supply, provides the power from its
battery to the system when power failure.
There are two types of UPS, Online UPS and stand by (Off line) UPS.

16. Expand UPS. Explain the types of UPS.


UPS is Uninterruptible Power Supply.
There are two types of UPS a) Online UPS and Offline UPS.
Online UPS: In online UPS, power supply flows through an inverter
whether the main power supply is ON or OFF. The inverter is ON
continuously.
Offline UPD( Stand by UPS): In offline UPS, the input current is
directly connected to the device. The inverter doesn’t remains in ON
state. It becomes ON only when main power supply gets OFF.

www.gkmvkalyan.blogspot.com Page 26
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 27 of 240

17. Explain System Bus?


An internal bus that connects all the internal components of a computer
such as CPU and memory to the motherboard.
The bus provides a communication path for the data and control signals
moving between the major components of the computer system.

Data bus: Data bus provides the path to transfer data between CPU
and Memory.
Address bus: Address bus connects CPU and RAM, which carries
address to store and retrieve the data.
Control bus: Control bus is used to control the access and the use
of the data and address lines.

18. What is the purpose of ports, buses and disk controller in the I/O
System?
Ports: Port is a connector used to connect external devices like
printers, scanners etc, to the computer.
Buses: A bus is a collection of parallel wires that forms a path way
to carry electrical signals over the components of computer.
Disk Controllers: Disk controller is a circuit that enables the CPU
to connector with Hard disk drive, Floppy Disk Drive and other disk
drives

www.gkmvkalyan.blogspot.com Page 27
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 28 of 240

Chapter 2: Boolean Algebra

One Mark MCQ’s Question and Answer with Two Marks.

1) What is a truth table?


A table which represents all possible values of logical variables /
statements along with all the possible results of the given
combinations of values.

2) Define Boolean Algebra.


An algebra that deals with binary number system is called “Boolean
Algebra”. It was invented by Georde Boole.

3) What are Boolean Postulates?


 The fundamental laws of Boolean algebra are called as the
postulates of Boolean algebra.
 These postulates for Boolean algebra originate from the three
basic logic functions AND, OR and NOT.

www.gkmvkalyan.blogspot.com Page 28
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 29 of 240

4) What is binary valued variable?


A variable which holds either 0(zero) or 1(one) is called binary
valued variable.

5) What is meant by Tautology and Fallacy?


Tautology:
If result of any logical statement or expression is always true or 1.
Fallacy:
If result of any logical statements or expression is always false or 0.

6) Define Minterm and Maxterm.


Minterm is a logical product of all the literals with or without bar
within the logic system.
Maxterm is a logical sum of all the literals with or without bar within
the logic system.

7) What is the other name of Boolean Algebra.


Switching Algebra.

8) What is principle of duality? Give an example.


This is a very important principle used in Boolean algebra. This
states that starting with a Boolean relation another Boolean relation
can be derived by
i. Changing each OR sign (+) to an AND sign (.)
ii. Changing each AND sign (.) to an OR sign (+)
iii. Changing each 0 by 1 and each 1 by 0.
The derived relation using duality principle is called dual of original
expression.

www.gkmvkalyan.blogspot.com Page 29
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 30 of 240

For instance, we take postulates of OR relation, which states that


(a) 0 + 0 = 0 (b) 0 + 1 = 1 (c) 1 + 0 = 1 (d) 1 + 1 = 1
Now according to above guidelines, '+' is changed to '.' 0's are
replaced by 1’s and 1’s are replaced by 0’s, these equations become
(a) 1.1=1 (b) 1.0=0 (c) 0.1=0 (d) 0.0=0
These are nothing but postulate III related to AND relations.

(just for references)

www.gkmvkalyan.blogspot.com Page 30
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 31 of 240

Self Study Note

Boolean Theorem can be proved by substituting all possible values of the


variable that are 0 and 1. This technique of proving theorem is called
Proof by perfect induction.
All the above theorems are explained below.

www.gkmvkalyan.blogspot.com Page 31
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 32 of 240

www.gkmvkalyan.blogspot.com Page 32
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 33 of 240

www.gkmvkalyan.blogspot.com Page 33
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 34 of 240

www.gkmvkalyan.blogspot.com Page 34
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 35 of 240

www.gkmvkalyan.blogspot.com Page 35
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 36 of 240

Quick references
a) Find the Maxterm for X+Y’+Z
The Maxterm is X’.Y.Z’

b)

c) What are the fundamental products for each of the input words;
ABCD = 0010, ABCD = 1101, ABCD = 1110. Write SOP expression.

The fundamental products are A’B’CD’ + ABC’D + ABCD’

d) A truth table has output 1 for each of these inputs.


ABCD = 0011, ABCD = 0101, ABCD = 1000, what are the
fundamental products.

The fundamental products are A’B’CD + A’BC’D + AB’C’D

e) Use the duality theorem to derive another boolean relation from :

A + A’B = A + B
A.(A’+B) = A.B
A.A’ +A.B=A.B
A.B=A.B (A.A’=0)

www.gkmvkalyan.blogspot.com Page 36
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 37 of 240

f) What would be the complement of the following:

(a) A’(BC’ + B’C) (b) xy + y’z + z’z

g) Construct a truth table for three variables A, B and C that will have
output 1 when ABC = 100, ABC = 110 and ABC = 111. Write the
boolean expression for logic network in the SOP form.

www.gkmvkalyan.blogspot.com Page 37
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 38 of 240

h) Construct a Boolean function of three variables X, Y and Z that has an


output 1 when exactly two of X, Y and Z are having value 0 and
output 0 in all other cases.

i) Construct a truth table for minterms and maxterms for three variables
and designate the terms.

www.gkmvkalyan.blogspot.com Page 38
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 39 of 240

j) Draw Karnaugh maps for the following expressions:

(a) X’Y’ + X’Y


(b) XYZ’ + X’Y’Z
(c) X’Y’Z’ + XY’Z’ + X’YZ’

k)

www.gkmvkalyan.blogspot.com Page 39
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 40 of 240

www.gkmvkalyan.blogspot.com Page 40
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 41 of 240

Self Notes on Maxterm and Minterm


Maxterm
A maxterm is a sum of all the literals (with or without the bar) within the
logic system.
If the value of a variable is 1, then its complement is added otherwise the
variable is added as it is.
Example: If the values of variables are X=0, Y=1 and Z=1 then its
Maxterm will be X' + Y' + Z(Y and Z are 1’s, so their complements are
taken; X= 0, so it is taken as it is).
Similarly if the given values are X=1, Y=0, Z =0 and W=1 then its
Maxterm is X' + Y + Z + W'.
Maxterms can also be written as M (Capital M) with a subscript which is
decimal equivalent of given input combination e.g., above mentioned
Maxterm X'+Y+Z+W' whose input combination is 1001 can be written as
M9 as decimal equivalent of 1001 is 9.

Minterms
Minterm is a product of all the literals (with or without the bar) within the
logic system.
One of the most powerful theorems within Boolean algebra states that
any Boolean function can be expressed as the sum of products of all the
variables within the system. For example, X+Y can be expressed as the
sum of several products, each of the product containing letters X and Y.
These products are called Minterms and each product contains all the
literals with or without the bar. Also when values are given for different
variables, minterm can easily be formed.
Example: if X=0, Y=1, Z=0 then minterm will be X'YZ' i.e., for variable
with a value 0, take its complement and the one with value 1, multiply it
as it is. Similarly for X=1, Y=0, Z=0, minterm will be XY'Z'.

www.gkmvkalyan.blogspot.com Page 41
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 42 of 240

l) Construct a Boolean function of three variables X, Y and Z that has an


output 1 when exactly two of X, Y and Z are having values 0, and an
output 0 in all other cases.

www.gkmvkalyan.blogspot.com Page 42
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 43 of 240

9) State and prove DeMorgan’s theorems by the method of perfect


induction.
Theorm-1
The complement of the sum of two or more variables is equal to the
product of the complement of the variables.

Theorm-2
The complement of the product of two or more variables is equal to
the sum of the complements of the variables.

www.gkmvkalyan.blogspot.com Page 43
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 44 of 240

10) State and prove DeMorgan’s theorems algebraically.

Theorm-1
The complement of the sum of two or more variables is equal to the
product of the complement of the variables.

www.gkmvkalyan.blogspot.com Page 44
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 45 of 240

Theorm-2
The complement of the product of two or more variables is equal to
the sum of the complements of the variables.

www.gkmvkalyan.blogspot.com Page 45
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 46 of 240

11) State and prove DeMorgan's theorem using Truth Table.


Theorm-1
The complement of the sum of two or more variables is equal to the
product of the complement of the variables.

Theorm-2
The complement of the product of two or more variables is equal to
the sum of the complements of the variables.

12) Mention the applications of De Morgan’s Theorem.


 It is used in simplification of Boolean expression.
 De Morgan’s law commonly apply to text searching using
Boolean operators AND, OR and NOT.
 It is useful in the implementation of the basic gates
operations with alternative gates.
 De Morgan's laws are an example of a more general concept
of mathematical duality.

www.gkmvkalyan.blogspot.com Page 46
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 47 of 240

13) What is Canonical Expression? Explain its types with example A


Boolean expression composed of entirely Minterms or Maxterms is
called Canonical expression.
There are two forms of Canonical expression
1. Sum of Product form- An expression in which two or more
Minterms are logically added, such expressions are called Sum of
Product expression. Ex: AB+AB’
2. Product of Sum form- An expression in which two or more
Maxterms are logically multiplied, such expressions are called
Product of Sum expression. Ex: (A+B’ ) (A’+B)

14) What is K-map?


Karnaugh Map or K-Map is a graphical display of the fundamental
product in a truth table. Karnaugh map is a rectangle made up of
certain number of squares, each square representing a Maxterm or
Minterm.

15) Draw the general k–map for 3 variables X, Y & Z.

16) Draw the general k–map for 4 variables A, B, C & D.

www.gkmvkalyan.blogspot.com Page 47
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 48 of 240

Karnaugh Map: - A graphical display of the fundamental products in a


truth table.
Fundamental Product: The logical product of variables and complements
that produces a high output for a given input condition.
 The map method provides simple procedure for minimizing the Boolean
function.
 The map method was first proposed by E.W. Veitch in 1952 known as
“Veitch Diagram”.
 In 1953, Maurice Karnaugh proposed “Karnaugh Map” also known as
“K-Map”.
Construction of K-Map: - The K-Map is a pictorial representation of a
truth table made up of squares. - Each square represents a Minterm or
Maxterm. - A K-Map for n variables is made up of 2nsquares.

Single Variable K-Map: - There are two Minterms (A and A’) for one
variable.
- Hence the map consists of 2 squares. (i.e. 2n square, 21 = 2square)

Two Variable K-Map: - There are four Minterms (A’B’, A’B, AB’ and AB
for two variable).
Hence the map consists of 4 squares (i.e. 2 n square, 22 = 4square)

Three Variable K-Map: - 3-variable K-map consists of 8 squares


(i.e. 2n square, 23 = 8square)

www.gkmvkalyan.blogspot.com Page 48
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 49 of 240

Four Variable K-Map:


The four variable Boolean expressions are of the form f (A, B, C, D).
There are sixteen Minterms for four variables.
Hence the map consists of 8 squares (i.e. 2 n square, 24 = 16square).
The rows and columns are numbered in a reflected code system.

Entries in the K-Map:

Each square represents a min-term or a max-term. Enter 1’s for the min
terms in the expression (0’s for the Maxterms).

Pair – Two adjacent 1’s form a pair.

Quadrant - Four adjacent 1’s form a quadrant.

Octet - Eight adjacent 1’s form an octet.

Note: Always try first for Octet(8), Quad(4), Pair(2) and


Single(1) order.

www.gkmvkalyan.blogspot.com Page 49
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 50 of 240

Five Mark Questions and Answers.

1) Simplify the following Boolean function using K-map


F(A, B, C, D) = Σ(1, 2, 3, 5, 7, 8, 9, 11, 13, 15)

2) Simplify the following Boolean function using K-map


F(A, B, C, D) = Σ(0, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15)

www.gkmvkalyan.blogspot.com Page 50
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 51 of 240

3) Reduce F(A,B,C,D)=(0,4,6,7,8,12,14,15) using K - map.

4)Given the Boolean function reduce it using k map.


F(W,X,Y,Z)=Σ(0,4,8,9,10,11,12,13,15)

www.gkmvkalyan.blogspot.com Page 51
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 52 of 240

5) Reduce F(A,B,C,D)= Σ(1,5,9,10,11,12,13,14) using K - map.

6)Given the Boolean function F(A,B,C,D)=Σ(5,6,7,8,9,10,14). Use K-map


to reduce the function F using SOP form. Write a logical gate diagram for
the reduced SOP expression.

Reduced terms
Pair-1=A’BD
Pair-2=CD’B
Pair-3=CD’A
Pair-4=AB’C’

Final reduced Term F(A,B,C,D)=

www.gkmvkalyan.blogspot.com Page 52
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 53 of 240

7) Given Boolean function F(A,B,C,D)= ∑(0,1,2,3,6,10,13,14,15) reduce it


by using Karnaugh map.

www.gkmvkalyan.blogspot.com Page 53
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 54 of 240

www.gkmvkalyan.blogspot.com Page 54
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 55 of 240

www.gkmvkalyan.blogspot.com Page 55
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 56 of 240

www.gkmvkalyan.blogspot.com Page 56
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 57 of 240

www.gkmvkalyan.blogspot.com Page 57
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 58 of 240

Simplify the following using K-Map


a) F(A,B,C,D)=∑(0,1,2,4,5,7,8,9,10,12,13)
b) F(A,B,C,D)=∑(1,2,3,4,5,7,9,11,12,13,14,15)
c) F(A,B,C,D)=∑( 0,1,3,4,8,9,11,13,14,15)
d) F(A, B, C, D) = Σ(0,1,2,5,7,8,9,10,13,15)
e) F(A, B, C, D) = Σ(0,1,3,5,7,8,9,11,13,15)
f) F(A,B,C,D)= Σ(2,3,8,9,10,11,12,13,14,15)
g) F(A,B,C,D)= Σ(0,2,4,8,9,10,11,12,13,15)

h)

www.gkmvkalyan.blogspot.com Page 58
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 59 of 240

www.gkmvkalyan.blogspot.com Page 59
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 60 of 240

Chapter 3: Logic Gates

One Mark MCQ’s Question and Answer.

1) What is a Logic Gate?


It is an electronic circuit which operates on one or more inputs
signals and produces only one output signal.

2) Mention Basic Gates.


All digital systems can be constructed by only three basic logic
gates. These basic gates are called the AND gate, the OR gate, and
the NOT gate.

3) What is meant by Universal Gates?


Universal gate is a gate using which all the basic gates can be
designed. NAND and NOR gates are called as the universal gates.

4) What is a truth table?


A table which represents all possible values of logical
variable/statements along with all the possible results of the given
combinations of values

5) Which basic logic gate is named as inverter?


NOT gate

6) Write the standard symbol of NAND gate?

www.gkmvkalyan.blogspot.com Page 60
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 61 of 240

7) Write the standard symbol of NOR gate?

8) Give the algebraic notation of XOR gate

9) Mention derived gates


Derived gates are those made out of simple combinations of the
basic gates.
a) NAND gate
b) NOR gate
c) XOR gate (Exclusive OR gate)
d) XNOR gate (Exclusive NOR gate)

www.gkmvkalyan.blogspot.com Page 61
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 62 of 240

Three Mark Questions and Answers.

1) What is meant by proof by perfect induction? Give an example.


Proof by perfect induction is a method of proving Boolean theorems by
substituting all possible values of the variables that are 0 and 1.

2) Explain basic logic gates with standard symbol and truth table.
AND Gate: - The AND Gate can have two or more input signals and
produce one output signal. When all the inputs are high (1) then the
output is high (1). Otherwise, the output is low(0).

OR Gate: - The OR Gate has two or more input signals but only one
output signal. If any one of the input signal is 1 (High) then the output
signal is 1 (High) otherwise output signal is 0 (Low).

www.gkmvkalyan.blogspot.com Page 62
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 63 of 240

Inverter (NOT gate):- An inverter is a gate with one input signal and one
output signal, the output state is always the opposite of the input state.

3) Explain Universal gates with symbol and logic circuit.


Universal gate is a gate using which all the basic gates can be
designed. NAND and NOR gates are called as the universal gates.
NAND Gate: - The NAND Gate has two or more input signals but only
one output signal. If all of the inputs are 1(High), then the output
signal is 0(Low) otherwise output signal is 1(High).

NOR Gate: - The NOR gate has two or more input signals but only one
output signal. If all the inputs are 0(Low), then the output signal is
1(High) otherwise output signal is 0(Low).

www.gkmvkalyan.blogspot.com Page 63
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 64 of 240

4) Explain XOR gate


An XOR gate implements an exclusive or; that is, If anyone inputs is
true, a true output results. If both inputs are false or both are true, a
false output results.

5) Explain XNOR gate.


Exclusive NOR gate (XNOR) is the NOT of XOR gate. i.e. the logic
gate that obtained by complementing the output of an XOR gate.

www.gkmvkalyan.blogspot.com Page 64
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 65 of 240

6) Realize AND, OR, and NOT gates using NOR gate.

www.gkmvkalyan.blogspot.com Page 65
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 66 of 240

7) Realize AND, OR, NOT gate using NAND gates.

www.gkmvkalyan.blogspot.com Page 66
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 67 of 240

Just Remember

www.gkmvkalyan.blogspot.com Page 67
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 68 of 240

Chapter 4: Data structures

One Mark MCQ’s Question and Answer.

1) Define data structures.


Data structure is a specialized format for organizing and storing
data.

2) What is meant by primitive data structure?


Data structure which is directly operated upon by machine-level
instructions are known as primitive data structure. These data
structures are used to store single values.

3) Give one example of primitive data structure.


Integer, Float, Character, Boolean, Pointer and Reference.

4) What is meant by non-primitive data structure?


The Data structures that are derived from the primitive data
structures are called Non-primitive data structure.
These data structures are used to store group of values.

5) Give one example of non-primitive data structure.


Arrays, Structure, Union, Linked List, Stacks, Queue etc

6) What are linear data structures?


Linear data structures are a kind of data structure that has
homogenous elements each element is referred to by an index.

7) Name any one linear data structure


Stack, Queues and Linked Lists

www.gkmvkalyan.blogspot.com Page 68
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 69 of 240

8) What are non-linear data structures?


A non-linear data structure is a data structure in which a data item
is connected to several other data items.

9) Name any one non-linear data structure.


Trees, Graphs

10) Define sorting.


The process of arranging the data elements in an ascending or
descending order is called sorting.

11) Define searching.


The process of finding the location of an element in the array.

12) Define an array.


An array is a collection of homogeneous elements with same name
and same data type.

13) What is queue?


Queue is a linear data structure that allows insertion of elements at
one end called REAR end and deletion of elements at other end
called FRONT. It is also called as FIFO (First-In First-Out).

14) What is stack?


A stack is an ordered collection of items where the addition of new
items and the removal of existing items always take place at the
same end. It is also called as LIFO(Last-In First-Out).

15) What is the other name for Stack?


LIFO (Last In First Out)

www.gkmvkalyan.blogspot.com Page 69
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 70 of 240

16) What is the other name for Queue?


FIFO (First In First Out)

17) Name the ordering principle of STACK


LAST IN FIRST OUT

18) Name the ordering principle of QUEUE


FIRST IN FIRST OUT

19) What is a binary tree?


A tree in which each node has at most two descendants is a binary
tree.

20) Mention any one application of stack.


Tower of Hanoi, Reverse a word, expression evaluation, undo
mechanism in text editor, expression evaluation, conversion of infix
to prefix and postfix expression, rearranging railroad cars.

21) Define Tree?


Tree is a non-linear data structure which organizes data in
hierarchical structure that consists of nodes with a parent-child
relationship.

22) Define root node


The topmost node in a tree is called the root node.

23) Define Sub tree.


A sub tree of a tree T is a tree consisting of a node in T and all its
descendants.

24) Define Depth of the node.


The depth of a node is the length of the path to its node.

www.gkmvkalyan.blogspot.com Page 70
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 71 of 240

25) Define Graph?


Graph is a non-linear data structure consisting of nodes and edges
which connect a pair of nodes.

26) When it is not possible to perform Binary search?


When the array elements are not in sorted order.

27) Which searching method need sorted array?


Binary Search

28) What is base address?


Address of the first location of an array

29) What is a linked list?


A linked list is a linear collection of nodes that contain data and
pointer.

30) Define traversal in data structure.


The process of accessing each data item exactly once to perform
some operation is called traversing.

31) Mention the application of Stack.


“Undo” mechanism in text editors, backtracking.

www.gkmvkalyan.blogspot.com Page 71
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 72 of 240

Three Mark Questions and Answers.

1) Mention the various operations performed on linear data structures.


The various operations performed on linear data structure are:
a) Traversal: The process of accessing each data item exactly once to
perform some operations is called traversing.
b) Insertion: The process of adding a new data item into the given
collection of data items is called insertion.
c) Deletion: The process of removing an existing data item from the given
collection of data items is called deletion.
d) Searching: The process of finding the location of an data item in the
given collection of data items is called searching.
e) Sorting: The process of arrangement of data items in ascending or
descending order is called sorting.
f) Merging: The process of combining the data items of two structures to
form a single structure is called merging.

2) Mention the various operations performed on arrays.


The following operations are performed on arrays:
a) Traversing: Accessing each element of the array exactly once to do
some operation.
b) Searching: Finding the location of an element in the array.
c) Sorting: Arranging the elements of the array in some order.
d) Insertion: Inserting an element into the array.
e) Deletion: Removing an element from the array.
f) Merging: Combining one or more arrays to form a single array.

www.gkmvkalyan.blogspot.com Page 72
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 73 of 240

3) Mention the applications of array.


 Arrays are used to Store List of values.
 Arrays are used to Perform Matrix Operations.
 Arrays are used to implement Searching Algorithms.
 Arrays are used to implement Sorting Algorithms.
 Arrays are used to implement mathematical vectors &
matrices.

4) What is an array? Mention any two types of arrays.


An array is a collection of homogeneous elements with same name
and same data type.
Types of arrays are:
 One dimensional array
 Two dimensional array
 Multi-dimensional array

5) Explain the memory representation of 1-dimenstional array.


An array is a collection of homogeneous elements with same name
and same data type.

Here A is an array of elements .The elements are 11, 22,33,44,55.


Each element is stored in memory location sequentially.
Index or Subscript value is used to refer a particular element in an
array.
In the above example, Array of 5 elements are represented with
index values 0, 1,2,3 and 4 .
A[0]=11, A[1]=22, A[2]=33, A[3]=44, A[4]=55

www.gkmvkalyan.blogspot.com Page 73
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 74 of 240

6) Explain the memory representation of 2-dimenstional array. (OR)


Give the memory representation for two dimensional array using
Colum Major Ordering.(OR) Give the memory representation for
two dimensional array using Row major order.

A two dimensional array is a collection of elements and each


element is identified by a pair of indices called as subscripts. The
elements are stored in contiguous memory locations.
There are two methods:
 Row-major order
 Column-major order
Consider the array int A[2][2]

a) Row-Major Order :
In row-major order, all the first-row elements are stored in
sequential memory locations and then all the second-row elements
are stored and so on.

www.gkmvkalyan.blogspot.com Page 74
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 75 of 240

b) Column major order:


In column-major order, all the first-column elements are stored in
sequential memory locations and then all the second-column
elements are stored and so on.

7) Mention the advantages of array.


a) It is used to represent multiple data items of same type by
using only single name.
b) It can be used to implement other data structures like linked
lists, stacks, queues, trees, graphs etc.
c) Two-dimensional arrays are used to represent matrices.

8) Mention the disadvantages of array.


a) We must know in advance that how many elements are to be
stored in array.
b) Array is static structure. It means that array is of fixed size.
c) Since array is of fixed size, if we allocate more memory than
requirement then the memory space will be wasted. If we allocate
less memory than requirement, then it will create problem.
d) The elements of array are stored in consecutive memory
locations. So insertions and deletions are very difficult and time
consuming.

www.gkmvkalyan.blogspot.com Page 75
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 76 of 240

9) Write an algorithm for traversal in a linear array.


Algorithm: Let A be a linear array with LB and UB as lower bound
and upper bound. This algorithm traverses the array A by applying
the operation PROCESS to each element of A.
Step 1: for LOC=LB to UB
PROCESS A[LOC]
End of for
Step 2: Exit

10) Write an algorithm for insert element into a one dimensional array.
Algorithm: A is the array with N elements. ITEM is the element to
be inserted in the position P.
Step 1: for I = N-1 down to P
A[I+1] = A[I]
End of for
Step 2: A[P] = ITEM
Step 3: N = N+1
Step 4: Exit

11) Write an algorithm to delete an element from one dimensional array


Algorithm: A is the array with N elements. ITEM is the element to
be deleted in the position P and it is stored into the variable item.
Step 1: Item = A[P]
Step 2: for I = P to N-1
A[I] = A[I+1]
End of for
Step 3: N = N-1
Step 4: Exit

www.gkmvkalyan.blogspot.com Page 76
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 77 of 240

12) Write an Algorithm for PUSH operation.


PUSH is an operation used to insert an element at the top. Before
pushing any element we must check whether there is a space in the
stack or not.
Algorithm for PUSH Operation: PUSH(STACK , TOP, SIZE, ITEM )
STACK is the array that contains N elements and TOP is the pointer
to the top element of the array. ITEM is the element to be inserted.
This procedure inserts ITEM into the STACK.
Step 1: If TOP = N-1 then
PRINT “Stack is full”
Exit
End of If
Step 2: TOP = TOP + 1
Step 3: STACK[TOP] = ITEM
Step 4: Return

13) Write an Algorithm for POP operation.


POP is an operation used to delete an element from the top. Before
doing POP operation we must check whether there is element in the
stack or not.
Algorithm for POP Operation: POP(STACK , TOP, ITEM)
STACK is the array that store N items. TOP is the pointer to the top
element of the array. This procedure deleted top element from
STACK.
Step 1: If TOP = NULL then
PRINT “Stack is empty”
Exit
End of If
Step 2: ITEM = STACK[TOP]
Step 3: TOP = TOP–1
Step 4: Return

www.gkmvkalyan.blogspot.com Page 77
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 78 of 240

14) Explain the memory representation of a stack using array.


Stack can be represented using a one-dimensional array. The
elements into stack are stored in a sequential order from the first
location of the array.
A pointer TOP contains the location of the top element of the stack.
A variable MAX contains the maximum number of elements that can
be stored in the stack.
The condition TOP=MAX indicates that the stack is full, which
represents “Overflow” and condition TOP=NULL indicates that stack
is empty which represents “underflow”.

15) Explain the different operations performed on STACK data structure.


a) stack( ): Creates a new stack that is empty.
b) push(item): Adds a new item to the top of the stack.
c) pop( ): Removes the top item from the stack.
d) peek( ): Returns the top item from the stack.
e) isEmpty( ): Tests whether the stack is empty or not.
f) size( ): Returns the number of items on the stack.

16) Write applications of stack.


Applications of Stack:
a) To reverse a word.
b) UNDO mechanism in text editor.
c) Backtracking.
d) To solve tower of Hanoi.
e) Expression Evaluation.
f) Rearranging rail road cars.

www.gkmvkalyan.blogspot.com Page 78
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 79 of 240

17) Explain the various operations performed on queue data structure.


a) Queue(): creates a new queue that is empty.
b) enqueue(item): adds a new item to the rear of the queue.
This operation is generally called as push.
c) dequeue(): removes the front item from the queue.
This operation is generally called as pop.
d) isEmpty(): tests to see whether the queue is empty or not.
e) size(): returns the number of items in the queue.

18) Explain the memory representation of a queue using array


Let QUEUE be a linear queue. Two pointer variables called FRONT
and REAR are maintained. The pointer variable FRONT contains the
location of the element to be removed and the pointer variable
REAR contains location of the last element inserted.
The condition FRON=NULL indicates that the queue is empty and
the condition REAR=N indicates the queue is full.
Queue is a First In First Out (FIFO).

19) Give the applications of queue.


a) Simulation.
b) Different types of scheduling algorithms
c) Round robin technique or Algorithm
d) Printer server routines
e) Multi-programming platform systems
f) In shared resource management.

www.gkmvkalyan.blogspot.com Page 79
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 80 of 240

Five Mark Questions and Answers.

1) What are data structures? How are data structures classified?


A data structure is a specialized format for organizing and storing data.

Data structure is classified as


Primitive data structures & Non primitive data structures
PRIMITIVE DATA STRUCTURES- Data structures that are directly
operated upon by machine-level instructions are known as primitive data
structures. The int, float, char, pointer are primitive data structures. They
are stores single values
NON-PRIMITIVE DATA STRUCTURES - These data structures are
derived from the primitive data structures. They cannot be directly
operated upon by programming instructions. They are stored in group of
values. Non-primitive data structures are further classified into two types:
a. Linear data structures- Linear data structures are a kind of data
structure that has homogenous elements each element is referred to by
an index. The linear data structures are Arrays, Stacks, Queues and
Linked List.
b. Non Linear data structures- A non-linear data structure is a data
structure in which a data item is connected to several other data items.
The non-linear data structures are Trees and Graphs.

www.gkmvkalyan.blogspot.com Page 80
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 81 of 240

2) What are primitive data structures? Explain the operations performed


on primitive data structure.
Data structure which is directly operated upon by machine-level
instructions is known as primitive data structure.

Operations performed on primitive data structure are:


Create: create operation is used to create a new data structure. This
operation reserves memory space for the program elements.
Example: int x;
Destroy: Destroy operation is used to destroy or remove the data
structures from the memory space.
Example: destructor member function in C++.
Select: Select operation is used by programmers to access the data
within data structure. This operation updates or alerts data.
Example: cout<<a;
Update: Update operation is used to change the data of data structures.
Example: int a=5, b=6;
a=a + b;
here, the value of a is assigned with new value 11(updated).

www.gkmvkalyan.blogspot.com Page 81
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 82 of 240

3) Write an algorithm to search an element in an array using linear search


method.

Algorithm: A is the name of the array with N elements. SE is the element


to be searched. This algorithm finds the location LOC where the search SE
element is stored.

www.gkmvkalyan.blogspot.com Page 82
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 83 of 240

4) Write an algorithm to search an element in an array using binary


search.
Algorithm: A is the sorted array with LOW as lower bound and HIGH as
the upper bound respectively. Let LOW, HIGH and MID denote beginning,
end and middle locations of the sorted array A.

Step1: LOW=0, HIGH=N-1, LOC=-1

Step2: while (LOW<= HIGH)


MID=int (LOW + HIGH)/2
if (SE= A[MID]) Then
LOC= MID
GOTO Step3
else
if (SE< A[MID]) Then
HIGH=MID-1
else
LOW=MID+1

Step3: if (LOC>= 0) Then


PRINT “Successful Search, Element Found at location” LOC
else
PRINT “Unsuccessful Search, Element not found”

Step4:Exit

www.gkmvkalyan.blogspot.com Page 83
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 84 of 240

5) Write an algorithm to insert a data element at the rear end of the


queue.
Let QUEUE be the linear array consisting of N elements. FRONT is
the pointer that contains the location of the element to be deleted and
REAR contains the location of the inserted element. ITEM is the element
to be inserted.
Step1: If REAR = N-1 Then
PRINT “ Queue is Full”
Exit
Step2: If FRONT = NULL Then
FRONT = 0
REAR = 0
Else
REAR = REAR + 1
Step3: QUEUE[REAR] = ITEM
Step4: Return

6) Write an algorithm to delete a data element from the queue.


Let QUEUE is the linear array consisting of N elements. FRONT is
the pointer that contains the location of the element to be deleted
and REAR contains the location of the inserted element. This
algorithm deletes the element at FRONT position.
Step1: If FRONT = NULL Then
PRINT “Queue is Empty”
Exit
Step2 : ITEM = QUEUE[FRONT]
Step3: If (FRONT = REAR) Then
FRONT = NULL
REAR = NULL
Else
FRONT = FRONT + 1
Step4: Return

www.gkmvkalyan.blogspot.com Page 84
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 85 of 240

8) Define queue. Explain different types of queues with neat diagrams.


Queue is a linear data structure that allows insertion of elements at
one end called REAR and deletion of elements at other end called
FRONT. It is also called as FIFO (First-In First-Out).

Simple Queue: In Simple queue insertion occurs at the rear end of the
list, and deletion occurs at the front end of the list.

Circular queue – A circular queue is a queue in which all nodes are


treated as circular such that the last node follows the first node.

Priority queue – In this queue, data elements are accepted as per the
time of occurrence and insertion and deletion of elements takes place
according to the priority mentioned in the queue.

www.gkmvkalyan.blogspot.com Page 85
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 86 of 240

Double ended queue (Dequeue) – It is a queue in which insertion and


deletion takes place at both the ends.

9) Write an algorithm for insertion sort method.

www.gkmvkalyan.blogspot.com Page 86
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 87 of 240

10) What is linked list? Explain in detail.

www.gkmvkalyan.blogspot.com Page 87
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 88 of 240

11) Explain different operations performed on linked list.

12) Explain types of linked list

www.gkmvkalyan.blogspot.com Page 88
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 89 of 240

www.gkmvkalyan.blogspot.com Page 89
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 90 of 240

Garbage collection:
If a node is deleted from the linked list or if a linked list is deleted, we
require the space to be available for future use. The memory space of
the deleted nodes is immediately reinserted into the free-storage list.
The operating system of the computer periodically collects all the
deleted space into the free-storage list. This technique of collecting
deleted space into free-storage list is called as garbage collection.

Non-Linear Data structure


A non-linear data structure is a data structure in which a data item is
connected to several other data items. So that a given data item has
the possibility to reach one-or-more data items.
Examples of non linear data structures are Trees and Graphs.

Pros
 Uses memory efficiently as contiguous memory is not required
for allocating data items.
 The length of the data items is not necessary to be known prior
to allocation.

Cons
 Overhead of the link to the next data item.

www.gkmvkalyan.blogspot.com Page 90
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 91 of 240

www.gkmvkalyan.blogspot.com Page 91
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 92 of 240

www.gkmvkalyan.blogspot.com Page 92
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 93 of 240

**********

www.gkmvkalyan.blogspot.com Page 93
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 94 of 240

UNIT-B

www.gkmvkalyan.blogspot.com Page 94
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 95 of 240

Chapter-6 OOP Concepts

Two Mark Questions and Answers.


1) What is object oriented programming?
Object oriented programming is the principle of design and
development of programs using modular approach.

2) Name Object Oriented Programming Languages?


C++, Java, C#, Python, PHP, Visual Basic.NET.

3) What is the difference between program module and an object?


A program module is a self-contained independent program
segment only it does not provide security to data whereas an object
is a collection of data members and member functions that operate
on data and data is provided with security.

4) Define Object and Class.


Object: An Object is an instance of a Class / A real world entity.
Class: A Class is a user defined data-type which has data members
and member functions. A class is a prototype used to create an
object.

5) Define base class and derived class.


Base Class: It is the class whose properties are inherited by another
class. It is also called Super Class.

Derived Class: It is the class that inherits properties from base class
(es).It is also called Sub Class.

6) Mention any two applications of OOPs.


 CAD/CAM software
 Object–Oriented Database

www.gkmvkalyan.blogspot.com Page 95
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 96 of 240

7) Mention different types of inheritance


Single inheritance, Multiple inheritance, Multilevel inheritance,
hybrid inheritance and hierarchical inheritance.

8) What is the significance of classes in OOP?


The Class allows to group functions and data variables.
The class is a way of grouping objects having similar characteristics.
The objects can be made user-defined data type with the help of a
class.

9) What is the difference between program module and an object?


A program module is a self-contained independent program
segment only it does not provide security to data whereas an object
is a collection of data members and member functions that operate
on data and data is provided with security.

10) Mention any two advantages of object oriented programming over


earlier programming methods.
a) OOP provides useful features like Inheritance, polymorphism, and
encapsulation, not available in earlier programming methods.
b) Once an object is created, knowledge of its implementation is not
necessary for its use. In older programs, coders need to understand
the details of a piece of code before using it in this or another
program.

www.gkmvkalyan.blogspot.com Page 96
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 97 of 240

Five Mark Questions and Answers.

1) Write the real life applications of object oriented programming.


 CAD/CAM software
 Object–Oriented Database
 Simulation and Modeling
 Mobile computing.
 Pattern recognition.
 Web based Application
 Artificial intelligence and expert systems
 Computer graphic applications
 User Interface design such as windows
 Real-time systems

2) Give the difference between procedural oriented programming and


object oriented programming.

www.gkmvkalyan.blogspot.com Page 97
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 98 of 240

3) Explain the characteristics of OOPs.


Objects: An object is a collection of data members and associated
member functions.
Class : A class is a way of grouping objects having similar
characteristics. Once a class is defined, any number of objects of
that class are created.
Data Encapsulation: Data encapsulation combines data and
functions into a single unit called class. Data encapsulation will
prevent direct access to data.
Data Abstraction: It refers to process of representing essential
features without including background details or explanations.
Inheritance: Inheritance is the capability of one class to inherit
properties from another class. The existing class is known as base
class. The new class is known as derived class.
Polymorphism: Polymorphism is a feature of object oriented
programming where a function can take multiple forms based on
the type of arguments, number of arguments and data type of
return value.
Message passing: in object oriented programming, methods are
invoked by sending messages to objects.
Dynamic Binding: Binding is the process of connecting one
program to another dynamically.

www.gkmvkalyan.blogspot.com Page 98
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 99 of 240

4) Explain the advantage of OOP.


a) The programs are modularized based on the principle of class
and objects.
b) OOPs reduces code duplication.
c) Providing data security with data encapsulation.
d) Easier to develop complex software with inheritance.
e) Allows code reusability by linking code and object.
f) Reduces software development time.
g) Communication with outside system is very simple with message
passing.

5) Define object oriented programming, Write the limitations of


object oriented programming.
Object oriented programming is the principal of design and
development of programs using modular approach.

Limitations / Disadvantages of OOP.


 There are no set standards for OOP.
 To convert real life problem into OOP is difficult.
 Difficult to adopt flow diagrams.
 Classes are overly Generalized.

www.gkmvkalyan.blogspot.com Page 99
II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 100 of 240

Chapter-7 Classes and Objects

One Mark MCQ’s Question and Answer.

1) What is a member function?


The functions declared inside the class are known as member
functions.

2) What is the significance of scope resolution operation in C++?


The significance of scope resolution operator(::) is to define
member function outside the class.

3) Is it possible to access data outside a class?


Yes.

4) What are the two types of members referenced in a class?


Data member and Member functions.

5) What are data members?


The variables declared inside the class are known as data members.

6) Mention the access specifier used with a class


private, public and protected

7) Which type of data members are accessible outside a class?


If the data members are declared in public access specifier.

8) Which access specifier is implicitly used in a class?


Private.

9) Mention the operator used to access members of a class.


Dot (.) operator

www.gkmvkalyan.blogspot.com Page 100


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 101 of 240

10) How are objects of a class declared? Give an example.


Class GKClass
{
private:
int a;
public:
void display()
{
a=100;
cout<<a;
}
};

void main()
{
GKClass X; // X is the object of class GKClass created
X.display();
}

11) What is meant by an array of objects?


An array having class type elements is known as array of objects.

12) What are default access specifier also called as?


private access specifier.

13) Define the term public access.


A data member or member function declared as public can be accessed by
any function outside the class also.

www.gkmvkalyan.blogspot.com Page 101


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 102 of 240

Five Mark Questions and Answers.


1) What is class definition? Write its general syntax and example.
Class definition: A class definition is a process of naming a class
and data variables, and functions of that class.
Class declaration: A class declaration specifies the representation
of objects of the class and set of operations that can be applied to
such objects.

Where
 class is a keyword in C++.
 class_names is the name of the class and can be treated as
the user defined data type.
 The pair of flower braces indicates the body of the class.
 The semicolon (;) after the right brace is must.
 The variables are declared inside and are called data
members.
 The member functions can access or manipulate data
members without passing them as parameters.
 The private, protected and public are access specifiers for the
members of class.

www.gkmvkalyan.blogspot.com Page 102


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 103 of 240

www.gkmvkalyan.blogspot.com Page 103


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 104 of 240

2) What is access specifier? Explain any two with examples. OR


What is the significance of using access specifier? Explain any two
access specifier with example.

The access specifiers define the scope of data.

The 3 types of access specifiers: private, public and protected.


private:
The data members declared under the private can only be accessed
by the member functions of the same class. If no access
specifier is mentioned, then by default, members are private.
public:
public access means that members can be accessed by any function
outside the class also. Thus keyword public identifies both class
data and functions that form the public interface for the class.
protected:
The members which are declared using protected can be accessed
only by the member functions, friends of the class and also by the
member functions derived from this class. The members cannot be
accessed from outside.

www.gkmvkalyan.blogspot.com Page 104


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 105 of 240

3) Explain member function inside the class definition with syntax and
example.
To define member function inside a class the function declaration
within the class is replaced by the actual function definition inside
the class. A function defined in a class is treated as inline function.
Only small functions are defined inside class definition.
Syntax:
return_type member_function(arguments_list)
{
function body;
}

Example:

www.gkmvkalyan.blogspot.com Page 105


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 106 of 240

4) Explain member function outside class definition. Give syntax and


example.
If the function size is larger and contain codes for complex
calculations, it better to define function outside the class definition.

Scope resolution operator :: is used to define the member function.


A scope resolution :: operator is used between the class name and
the function name to specify that the member function belong to
that class.
Syntax:
return_type class_name :: member_function(argument_list)
{
function body;
}
Example:

www.gkmvkalyan.blogspot.com Page 106


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 107 of 240

www.gkmvkalyan.blogspot.com Page 107


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 108 of 240

5) What are member functions in a class? Write any four


characteristics of member function.
The functions declared inside the class are known as member functions.
The characteristics of member functions are:
 The Data type and number of arguments in the member function
must be same as the data type and number of data declared in
class definition.

 The symbol :: is known as scope resolution operator. The scope


resolution operator identifies the function as a member of particular
class.
 Member functions can access the private data of the class. A non-
member function cannot do so.
 Several classes can use the same function name.

6) Explain how objects of a class can be defined?


The objects are declared after a class is defined. The object
declaration creates object of that class and memory is allocated for
the created object.
Syntax:
classname objectname1, objectname2,...;
Example:
GKSUM X;
The X is the object of class type GKSUM.
The object names are used to access the data members through
member functions by invoking member functions.

www.gkmvkalyan.blogspot.com Page 108


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 109 of 240

www.gkmvkalyan.blogspot.com Page 109


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 110 of 240

7) Illustrate how an array of objects can be defined.


An array of a class type is also known as an array of objects. An array
of objects is declared after class definition and is defined in the same
way as any other array.

In the above example, the array supervisor contains 3 objects


namely
supervisor[0], supervisor[1], supervisor[2].

www.gkmvkalyan.blogspot.com Page 110


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 111 of 240

8) Explain arrays as members of classes.


It is possible to use arrays as member data of class type.

www.gkmvkalyan.blogspot.com Page 111


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 112 of 240

9) A class clock has following members : a. hour b. minute


Create member functions
a. To initialize the data members
b. Display the time
c. To convert hours and minutes to minutes

www.gkmvkalyan.blogspot.com Page 112


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 113 of 240

Chapter-8 Function Overloading & Member Function

One Mark MCQ’s Question and Answer.


(See in MCQ’s Section)

Five Mark Questions and Answers.


1) What is function overloading? Explain the need for function overloading?
When two or more functions have same name but differ in number
of arguments or data type of arguments is called function
overloading.
The advantages of (need for) function overloading are:
 Code can be executed faster.
 Code maintenance is easy.
 It is easier to understand the flow of information and debug.
 Easier interface between programs and real world objects
 Eliminates the use of different function names.

2) When is function overloading is needed? Write any two advantages


and restrictions on overloading functions.
Function overloading is normally used when several function of the
same name perform identical tasks on different data types.
The advantages of function overloading are:
 Code can be executed faster.
 Code maintenance is easy.
 It is easier to understand the flow of information and debug.
 Easier interface between programs and real world objects
 Eliminates the use of different function names.
Restrictions on overloaded functions
 Each function in a set of overloaded functions must have
different argument list.
 If typedef is used for naming functions, then the function is
not considered as different type.

www.gkmvkalyan.blogspot.com Page 113


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 114 of 240

3) Discuss overloaded functions with an example.


When two or more functions have same name but differ in number
of arguments or data type of arguments is called function
overloading or overloaded function.

www.gkmvkalyan.blogspot.com Page 114


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 115 of 240

4) Explain inline function with programming example?


An inline function is a special type of function whose body is
inserted in place of the function call.
The keyword inline is used to define inline function

Example:

www.gkmvkalyan.blogspot.com Page 115


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 116 of 240

5) What are the advantages and disadvantages of inline function.


Advantages of inline functions
 The speed of execution of a program increases.
 Efficient code can be generated.
 Readability of the program increases.
 The size of the object code is considerably reduced.

Disadvantage of inline functions


 As the body of inline function is substituted in place of
function call the size of the executable file increase and more
memory is needed.
 Not suitable for too long, complicated, recursive function
definition.

6) When is it possible that an inline function may not work?


The inline function may not work some times for one of the
following reasons:
 The inline function definition is too long or too complicated.
 The inline function is recursive.
 The inline function has looping constructs
 The inline function has a switch or goto.

www.gkmvkalyan.blogspot.com Page 116


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 117 of 240

7) What is friend function? Write the characteristics of a friend


function.
Friend function is a non-member function that can access the
private and protected data member of a class.
It is declared inside a class with the prefix friend and defined
outside the class line any other normal function without the prefix
friend.

Characteristics of a friend function.


 A friend function has full rights to access the private and
protected members of the class.
 The function is declared with keyword friend.
 It can be called like any normal function without using any
object.
 It can be placed anywhere in the class declaration.
 Scope resolution operator (::) is not needed while defining a
friend function.
 It cannot access the member variables directly and has to use
an object_name.member_name.

Note:
A friend function is useful when a function to be shared between the two
classes by making a function as a friend to both the classes, thereby
allowing a function to access private and protected data members of both
classes.

www.gkmvkalyan.blogspot.com Page 117


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 118 of 240

8) Explain friend function with syntax and programming example?


A friend function is a non-member function of a class which gets
access to private, protected and public data of a class. It is declared
within a class with the prefix friend keyword.

www.gkmvkalyan.blogspot.com Page 118


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 119 of 240

Chapter-9 Constructors and Destructors

One Mark MCQ’s Question and Answer.


(See in MCQ’s Section)

Two Mark Questions and Answers.


1) Define: (A) Constructor (B) Destructor
A Constructor is a special member function used to initializing the
objects of a class automatically.
A destructor is a special member function used to de-initializing the
objects of a class automatically.

2) Mention different types of constructors.


There are three types of constructors, namely:
a) Default constructor
b) Parameterized constructor
c) Copy constructor

3) Write any two rules to create constructor.


a) A constructor must have the same name as that of the class
name.
b) There is no return type for constructor (not even void).
c) A constructor should be defined under public specifier.
d) A constructor can have default arguments.
e) A constructor is invoked automatically when objects are created.
f) It is not possible to refer to the address of the constructor.
g) The constructors make implicit calls to the operators new and
delete when memory allocation is required.

www.gkmvkalyan.blogspot.com Page 119


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 120 of 240

4) What is a destructor? Which is the operator used with destructor.


function? OR What is destructor? Write the symbol used for
destructor.
A destructor is a special member function used for de-initializing the
objects of a class automatically. ~(TILDE) is the operator used for
destructor.

5) What are the features of default constructors?


Features of default constructor are:
a) For every object created, this constructor is automatically
called.
b) All objects of a class are initialized to same set of values by
the default constructor.
c) If different objects are to be initialized with different values, it
cannot be done using default constructor.

6) What are the disadvantages of default constructor?


a) When many objects of the same class are created, all objects
are initialized to same set of values by default constructor
b) It is not possible to initialize different objects with different
initial values using default constructor.

7) Mention any two features of parameterized constructor.


 Parameterized constructors can be overloaded.
 Parameterized constructors can have default arguments and
default values.
 For an object created with one argument, constructor with only
one argument is invoked and executed.

www.gkmvkalyan.blogspot.com Page 120


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 121 of 240

8) Which are the different methods through which constructors are


invoked?
The different methods through which constructor are invoked are
 Explicit Call
 Implicit Call
 Using = Operator

9) Define Constructor? Give an example for it.


A Constructor is a special member function used to initializing the
objects of a class automatically.

10) Why are constructors needed in a program? Justify.


It is sometimes convenient if an object can initialize itself when it is
first created, without the need to make a separate call to a member
function. Automatic initialization is carried out using such a special
member function called constructor.
Uninitialized member have garbage in them. This creates the
possibility of serious bug. So we need constructors to initialize the
data members of a class.

11) When is copy constructor used in a program?


Copy constructors are used in the following situations.
a) To initialize an object with the values of already existing
objects.
b) When objects must be returned as function values
c) To state objects as by value parameters of a function.

www.gkmvkalyan.blogspot.com Page 121


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 122 of 240

12) Write syntax and example for copy constructor.


Copy constructor is a parameterized constructor using which one
object can be copied to another object.

www.gkmvkalyan.blogspot.com Page 122


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 123 of 240

Five Mark Questions and Answers.


1) What is constructor? Give the rules of writing a constructor function.
OR Write the rules to be followed in writing the constructor function
in C++.OR Give the definition for a constructor and mention the
rules for writing constructor function.
A Constructor is a special member function used to initializing the
objects of a class automatically.
The following rules are used for writing a constructor function:
i) A constructor must have the same name as that of the class
name.
ii) There is no return type for constructor (not even void).
iii) A constructor should be defined under public specifier.
iv) A constructor can have default arguments.
v) A constructor is invoked automatically when objects are created.
vi) It is not possible to refer to the address of the constructor.
vii) The constructors make implicit calls to the operators new and
delete when memory allocation is required.

2) What is a constructor? Mention different types of constructors and


explain any one constructor in brief.
A Constructor is a special member function used for initializing the
objects of a class automatically.
There are three types of constructors, namely:
a) Default constructor.
b) Parameterized constructor.
c) Copy constructor.
Default Constructor: A constructor which doesn’t accept any
arguments is called a zero argument constructor or default
constructor.

www.gkmvkalyan.blogspot.com Page 123


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 124 of 240

3) Explain default constructor with programming example.


Default Constructor: A constructor which doesn’t accept any
arguments is called a zero argument constructor or default
constructor.

www.gkmvkalyan.blogspot.com Page 124


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 125 of 240

4) Explain the features of default constructor. Write the syntax and


example for default constructor.
The features of default constructor are:
 All objects of a class are initialized to same set of values.
 These constructors have no arguments.
 These constructors are automatically called when every object is
created.

Syntax and Example for default Constructor

www.gkmvkalyan.blogspot.com Page 125


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 126 of 240

5) Explain with example to show how a constructor is invoked


explicitly. (OR) Write an example to show the use of parameterized
constructor through explicit call.
In this method, the declaration of an object is followed by
assignment operator, constructor name and argument list enclosed
in parenthesis. Example: test p=test(15, 25);
Where in ‘test’ is the class name, ‘p’ is the object, test(15, 25) is
the constructor name with argument list.

www.gkmvkalyan.blogspot.com Page 126


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 127 of 240

6) Explain with example to show how a constructor is invoked


implicitly?
In this method the declaration of the object is followed by argument
list enclosed in parentheses.
Example: test p(15,25);
Where in ‘test’ is the class name and p is object.

www.gkmvkalyan.blogspot.com Page 127


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 128 of 240

7) Explain with example to show how a constructor is used to initialize


objects using assignment (‘=’) operator?
This method is used for the constructor with exactly one argument.
The declaration of the object is followed by assignment operator and
the value to be initialized without constructor name.
Example:
test s=1234;
Where in ‘test’ is the class name and s is object.

www.gkmvkalyan.blogspot.com Page 128


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 129 of 240

8) What is copy constructor? Explain syntax and programming


example?
Copy constructor is a parameterized constructor using which one object
can be copied to another object.
A copy constructor is called/used in the following situation, when:
 Initializing an object to another object.
 Passing an object to a function.
 Returning an object from a function

www.gkmvkalyan.blogspot.com Page 129


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 130 of 240

9) Explain the features of copy constructor.


a) copy constructor is a special type of parameterized constructor.
b) It is normally used to copy one object into another.
c) They are normally used to initialize object with values of already
existing object.
d) Copy constructors should have at least one argument of the same
class and must be passed as a constant reference type.
e) The copy constructor cannot be invoked explicitly but can be
equated to an already existing object in the declaration itself.

www.gkmvkalyan.blogspot.com Page 130


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 131 of 240

10) Write short notes for constructor overloading.


Overloading a constructor means having many constructors in a class with
different types arguments and/or different number of arguments. The
compiler decides which version of the constructor to invoke during object
creation based on number of arguments and type of arguments passed in
a program.

www.gkmvkalyan.blogspot.com Page 131


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 132 of 240

11) Explain destructor with syntax and example.


A destructor is a special member function used for de-initializing the
objects of a class automatically.
Destructors have same name as the class preceded by a tilde ( ~)

Features or rules for creating destructor:


a) The destructor name is same as that of class name and preceded with
symbol tilde (~).
b) It will not have return value.
c) They take no arguments. Therefore, destructors cannot be overloaded.
d) There can be only one destructor in each class
e) It should be declared in public section of class.
f) It is mainly used to de-allocate memory that was allocated for the
object by the constructor.

www.gkmvkalyan.blogspot.com Page 132


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 133 of 240

Chapter-10 INHERITANCE

One Mark MCQ’s Question and Answer.


(See in MCQ’s Section)

1. What is inheritance? Mention its advantages.


Inheritance is the capability of one class to inherit properties from
another class.
Advantages of Inheritance:
1. Reusing existing code
2. Faster development time
3. Easy to maintain the code
4. Easy to extend
5. Memory utilization

2. What is inheritance? Explain briefly the types of inheritance.


Inheritance is the capability of one class to inherit properties from
another class.
Types of Inheritance.
a) Single level inheritance.
b) Multilevel inheritance.
c) Multiple inheritance.
d) Hierarchical inheritance.
e) Hybrid inheritance.
a) Single Inheritance –If a class is derived from a single base class,
it is called as single inheritance.

www.gkmvkalyan.blogspot.com Page 133


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 134 of 240

b) Multilevel inheritance- if a class is derived from another derived


class is called as multilevel inheritance.

c) Multiple Inheritance- If a class is derived from more than one


base class is known as multiple inheritance.

d) Hierarchical Inheritance-if a number of classes are derived from


a single base class, it is called as Hierarchical inheritance.

www.gkmvkalyan.blogspot.com Page 134


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 135 of 240

e) Hybrid Inheritance- Hybrid Inheritance is combination of


hierarchical and multilevel inheritance.

www.gkmvkalyan.blogspot.com Page 135


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 136 of 240

3. What is virtual base class? Give example.


The base class is declared as the virtual base class so that only one
copy of its members are inherited by the derived class in a hybrid
inheritance.
For example, the derived class D derive from the classes B and C
whereas both the classes B and C are derived from base class A.
Then base class A is inherited twice and to avoid two copies of class
A to class D, class A is declared virtual base class

www.gkmvkalyan.blogspot.com Page 136


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 137 of 240

4. Explain singe inheritance with a suitable C++ program.


Inheritance is the capability of one class to inherit properties from
another class.

www.gkmvkalyan.blogspot.com Page 137


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 138 of 240

5. What is visibility mode? What is its role with respect to inheritance?


The visibility mode in inheritance specifies the access mode of base
class members to derived class. Visibility mode can be public,
private or protected. The private data of base class cannot be
inherited.

Public inheritance:
The public members of a base class become public member of the
derived class.
The private members cannot be inherited to the derived class.
The protected members stay protected.
Private inheritance:
The public members of base class become the private members of
derived class.
The private members cannot be inherited to the derived class.
The protected members become private members in the derived
class.
Protected inheritance:
The public members of a base class become the protected in a
derived class.
The private members cannot be inherited to the derived class.
The protected members will stay protected in the derived class.

www.gkmvkalyan.blogspot.com Page 138


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 139 of 240

6. Which are the components which cannot be inherited?


A derived class inherits every member of a base class except:
a) its constructor and its destructor.
b) its operator=() members .
c) its friends.

7. How does inheritance influence the working of constructors?


The inheritance influence the working of constructor, if base class
contains parameterized constructor, then it is compulsory to pass
the arguments using derived class. Normally derived class is used to
declare objects therefore derived class is used to pass arguments to
base class constructor.
If both base class and derive class has constructors, then base class
constructor is executed first and then derived class constructor is
executed. The derived class is responsible to pass arguments to
both base class as well as derived class.

8. How does inheritance influence the working of destructors?


 Constructors, destructors and overloaded assignment operators are
not inherited.
 the derived-class constructor will initialize the additional derived-
class data members.
 When a derived-class object is destroyed, the destructors are called
in the reverse order of the constructors:
 First the derived-class destructor is called, then the base-class
destructor.
 When deriving a class, the base class may be declared as either
public, protected, or private.

www.gkmvkalyan.blogspot.com Page 139


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 140 of 240

Chapter-11 POINTERS

One Mark MCQ’s Question and Answer.


1) What is Pointer?
Pointer is a variable which stores the memory address of another
variable.

2) How do you declare pointer? OR Write the declaration syntax for a


pointer.
Syntax: datatype *pointername;
Example: int *p;

3) How do we initialize a pointer?

int *ptr, n=5;

ptr=&n;

4) Mention any one advantage of pointer.


Memory is utilized properly.

5) Which operator is used as address operator?


Ampersand (&) is used as address operator.

6) Which operator is used as pointer operator?


Asterisk (*) is used as Pointer operator or indirection operator.

7) What is address operator?

Ampersand (&) is a address operator that returns the memory


address of its operand.

8) What is pointer operator?

Asterisk (*) is a pointer operator that returns the value of the


variable located at the address specified by its operand.
9) What is new operator in C++?
New operator is used to allocate memory at run time.

10) What is delete operator in C++?


Delete operator is used to de-allocate the memory.

www.gkmvkalyan.blogspot.com Page 140


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 141 of 240

11) Mention any one operation performed on pointer.


We can Add an integer value to a pointer

12) What does the name of an array represent in pointer array?


The name of an array represents the address of the first element in
an array. i.e (A=&A[0]).

13) What is static memory?


Memory allocated during the compilation is called Static memory
allocation.

14) What is dynamic memory?


Memory allocated during the run time is called Dynamic memory
allocation.
15) What is free store?
Free store is a pool of unallocated memory heap given to a program
for dynamic memory allocation.

16) Write a definition for a variable of type pointer to float.

Syntax: float *pointervariable;


Example: float *fptr;

17) What is this pointer?


Every object in C++ has access to its own address through an
important pointer called this pointer.

www.gkmvkalyan.blogspot.com Page 141


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 142 of 240

Three Mark Questions and Answers.


1) What are the advantages of pointers?
Advantages of pointers are:
 Memory is utilized properly.
 It is possible to write efficient programs.
 Dynamically allocate & de-allocate memory.
 Easy to deal with hardware components.
 Establishes communication between program and data.

2) Write the difference between static and dynamic allocation of


memory.

3) What are the operations performed on pointers?


 We can add an integer value to a pointer.
 We can subtract an integer value from a pointer.
 We can increment a pointer variable.
 We can decrement a pointer variable.
 We can compare two pointers (both point to the same array).
 We can assign one pointer to another (both of same type).
 We can subtract one pointer from another pointer (both point to the
same array).

www.gkmvkalyan.blogspot.com Page 142


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 143 of 240

4) What is array of pointers? Give an example.


An array of pointers means collection of addresses.
The example below shows the array of pointers.

5) Explain the use of new and delete operators in pointers.


C++ supports dynamic allocation and de-allocation of objects using
the new and delete operators.
New operator allocate memory for objects

Delete operator de-allocates memory which is allocated by new


operator.

6) What is Memory leak?


If the objects, that are allocated memory dynamically, are
not deleted using delete, the memory block remains occupied even
at the end of the program. Such memory blocks are known as
orphaned memory blocks. These orphaned memory blocks when
increase in number, bring adverse effect on the system. This
situation is called memory leak.

www.gkmvkalyan.blogspot.com Page 143


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 144 of 240

7) Explain with example by passing the reference.


When parameters are passed to the functions by reference, the
formal
parameters become reference to the actual parameters in the
calling
function.

www.gkmvkalyan.blogspot.com Page 144


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 145 of 240

8) Explain with example by passing the pointers.


When the pointers are passed to the function, the addresses of
actual
arguments in the calling function are copied into formal arguments
of the called function.

www.gkmvkalyan.blogspot.com Page 145


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 146 of 240

9) What is the relationship between object and pointers? Give


example.
The pointers pointing to objects are referred to as object pointers.
There is a relationship between pointers and objects. Using pointers
all the members of the class can be accessed. The following
example shows various operations that can be performed on the
members of the class through a pointer to objects.
Declaration of pointers to objects
classname *objectpointer;

Here, classname is the name of an already defined class and


objectpointer is the pointer to an object of this class type.
Example: GKStudent *ptr;

Here, GKStudent is an already defined class. When accessing


members of a class using an object pointer (*ptr), the arrow
operator (->) is used.

Example:

www.gkmvkalyan.blogspot.com Page 146


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 147 of 240

www.gkmvkalyan.blogspot.com Page 147


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 148 of 240

Chapter-12 Data File Handling

Two Mark Questions and Answers.


1) What is a stream? Mention any one stream used in C++.
A stream is a flow of data from input to output device for
processing.
The streams in C++ are ofstream, ifstream, fstream

2) What are input and output streams?


The input streams are sequence of characters that move from input
devices like a keyboard to the program/computer.
The output streams are sequence of characters that move from
program/computer to an output device like a monitor.

3) Differentiate between ifstream class and ofstream class.

4) Write the member functions belonging to fstream class.


read( ), write( )

5) Write the member functions belonging to ifstream class


get(), getline(), read(), seekg(), tellg()

6) Write the member functions belonging to ofstream class


put(), write(), seekp(), tellp()

www.gkmvkalyan.blogspot.com Page 148


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 149 of 240

7) Mention the methods of opening file within C++ program.


Opening file using constructor.
Opening file using open( );

8) Differentiate between read ( ) and write ( ).

9) Differentiate between get ( ) and getline ( ).


get( ):
 The get() member function belongs to the class
ifstream.
 The function get() reads a single character from the
associated stream.
 Syntax: ifstream_object.get(ch);
getline( ):
 It is used to read a whole line of text.
 It belongs to the class ifstream.
 Syntax: fin.getline(buffer, SIZE);

10) Name the stream classes supported by C++ for file input and
output.
ifstream, ofstream, fstream, filebuf, fstreambase.

11) What are the advantages of saving data in Binary form?


It is a file that contains information in the same format as it is held
in memory. In binary files, no delimiters are used for a line and
no translations occur here.

www.gkmvkalyan.blogspot.com Page 149


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 150 of 240

12) Differentiate between put( ) and get( ) functions with reference to


text files.
put():
The put() member function belongs to the class ofstream.
The function put() writes a single character to the associated
stream.
Syntax: ofstream_object.put(ch);
get( ):
The get() member function belongs to the class ifstream.
The function get() reads a single character from the associated
stream.
Syntax: ifstream_object.get(ch);

13) Write the difference between text file and binary file.

www.gkmvkalyan.blogspot.com Page 150


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 151 of 240

14) Differentiate seekg() and seekp() functions with respect to files.


seekg():
Move the get pointer to a specified location from the beginning of a
file.
Example: inf.seekg(20) ;
The above example tells that the get pointer points to 20th byte in
a file from 0th byte.
seekp():
Move the put pointer to a specified location from the beginning of a
file.
Example: inf.seekp(20) ;
The above example tells that the put pointer points to 20th byte in
a file from 0th byte.

15) What is the use of eof( ) and tellp( ) with respect to files.
eof( ): it helps in detecting the end of file. Once the end of
file is detected with the use of eof() member function, we can stop
reading further.

tellp( ): The purpose of the function is to return current position of


the put pointer.

www.gkmvkalyan.blogspot.com Page 151


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 152 of 240

Three Mark Questions and Answers.


1) Give the function of put( ), get( ), and getline( ) with respect to text
files.

put():
 The put() member function belongs to the class ofstream.
 The function put() writes a single character to the associated
stream.
 Syntax: ofstream_object.put(ch);

get( ):
 The get() member function belongs to the class
ifstream.
 The function get() reads a single character from the
associated stream.
 Syntax: ifstream_object.get(ch);

getline( ):
 It is used to read a whole line of text.
 It belongs to the class ifstream.
 Syntax: fin.getline(buffer, SIZE);

www.gkmvkalyan.blogspot.com Page 152


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 153 of 240

2) List the different modes of opening a file with their meaning in C++.
(OR)Explain any three modes to open a file in C++(OR)
Discuss the file mode parameters in C++?

3) Give the functions of the following. a. get( ) b. getline( ) c. read( )


(OR) Write the member function belong to ifstream class. (OR)
Explain any 3 member functions that belong to ifstream class.
 get() member function belongs to the class ifstream and the
function get() reads a single character from the associated
stream.
 getline(): It is used to read a whole line of text. It belongs to
the class ifstream.
 read() member function belongs to the class ifstream and
which is used to read binary data from a file.

www.gkmvkalyan.blogspot.com Page 153


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 154 of 240

4) Write the types of files and explain them.


There are two types of files a) Text file b) Binary file.
a) Text file –
 It stores the information in ASCII characters.
 Each line of text is terminated with a special character known as
EOL (End Of Line) character.
 Some internal translation takes place when this EOL character is
read or written.
b) Binary file –
 It is a file that contains information in the binary form.
 There is no delimits for a line.
 There is no translation occur after the read and write operations.
 The binary files are faster and easier for programming to read and
write the data or information.

5) Mention the basic operations on binary file in C++.


The basic Operation on Binary File in C++ are
a. Searching.
b. Appending data.
c. Inserting data in sorted files.
d. Deleting a record
e. Modifying data

www.gkmvkalyan.blogspot.com Page 154


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 155 of 240

6) Mention the methods of opening file within C++. Discuss any one.
The method of opening a file within C++ programs
 Opening a file using Constructor.
 Opening a file using open() member function.
Opening a file using constructor:
a. Opening a file for output purpose only.
Syntax: ofstream filestreamobject(“filename”);
Example: ofstream myfile(“results.dat”);

b. Opening a file for input purpose only.


Syntax: ifstream filestreamobject(“filename”);
Example: ifstream myfile(“results.dat”);

Opening a file using open() member function.


a. The syntax for opening a file for output purpose
Syntax: ofstream object.open(“filename”)
Example: ofstream ofile;
ofile.open(“text.dat”);

b. The syntax for opening a file for input purpose


Syntax: ifstream object.open(“filename”)
Example: ifstream ifile;
ifile.open(“text.dat”);

www.gkmvkalyan.blogspot.com Page 155


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 156 of 240

7) Differentiate between ios::in and ios::out

8) Explain tellg(), tellp(),function.

tellg()
• Belongs to ifstream class
• To return current position of get pointer
• Syntax: int position; position=fin.tellg()
tellp()
• Belongs to ifstream class
• To return current position of put pointer
• Syntax: int position; position=fin.tellp()
**********

www.gkmvkalyan.blogspot.com Page 156


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 157 of 240

UNIT-C

www.gkmvkalyan.blogspot.com Page 157


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 158 of 240

Chapter 13: Database Concepts

One Mark MCQ’s and 5 fill up the blanks Question and Answer.

1) What is data?
Data is a collection of facts, figures, statistics, which can be
processed to produce meaningful information.

2) What is information?
Information is processed data with some definite meaning.

3) What is database?
A Database is a collection of logically related data organized in such
a way that data can be easily accessed, managed and updated.

4) Define DBMS.
A Data Base Management System is software that allows creation,
definition and manipulation of database.

5) Name the data types supported by DBMS.


integer, characters, date, string

6) What is a field?
Each Column is identified by a distinct header called attribute or
field.

7) What is a record?
A row in a table is called Record or tuple.

8) What is an entity?
An entity is an object or a record which contains a set of attributes.

9) What is an instance?
The data stored in database at a particular moment of time.

www.gkmvkalyan.blogspot.com Page 158


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 159 of 240

10) What is an attribute?


A column in a table.

11) What is domain?


A set of atomic values. OR All the possible unique values of a
particular column.

12) What is a table?


A table is a collection of related data elements organized in terms of
rows and columns.

13) Define tuple.


A row in a table.

14) What is relation?


A relation means a 'table', in which data are organized in the form
of rows and columns.

15) What is key?


A key is one of the attributes of a table to identify one or more
tuple/records of the table.

16) What is Cardinality?


Cardinality is number of rows (tuples) in a table.

17) What is Data mining?


Process of analyzing and picking information from large volume of
data.

18) Define primary Key.


A column or set of columns that uniquely identifies a row within a
table is called primary key.

www.gkmvkalyan.blogspot.com Page 159


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 160 of 240

19) What is Normalization?


Normalization is the process of organizing data in a database. This
makes the database more flexible by eliminating redundancy and
inconsistent dependency.

20) Give the symbol notation for project

π (pi)

21) What is Data model?


A Database model defines the logical design of data. The model
describes the relationships between different parts of the data.

22) What is Generalization?


Generalization is a bottom-up approach in which two lower level
entities combine to form a higher level entity.

www.gkmvkalyan.blogspot.com Page 160


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 161 of 240

23) What is Specialization?


Specialization is a top-down approach in which a higher-level entity
is divided into multiple specialized lower-level entities.

24) What is Aggregation?


Aggregation is a process when relation between two entity is
treated as a single entity. Here the relation between Center and
Course, is acting as an Entity in relation with Visitor.

25) What is Degree


The degree is the number of attributes (columns) in a table.

www.gkmvkalyan.blogspot.com Page 161


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 162 of 240

Two, Three and Five Mark Questions and Answers.

1) What is data Independence? Mention its types.


Data independence is an ability to modify the schema definition at one
level without affecting in another level.
The two types are:
a) Physical Data Independence
b) Logical Data Independence
Physical data independence: Physical data independence indicates that
the physical storage structures or devices could be changed without
affecting conceptual schema.
Logical Data independence: Logical data independence indicates that the
conceptual schema can be changed without affecting the existing external
schemas.

2) Explain the applications of DBMS.


Banking: to retain customer information and other banking
transaction.
Railways and Airlines: For ticket reservation and schedule
information.
Colleges: to retain student information and generating reports like
progress report, fee payment details etc.
Credit card transactions: to generate monthly statement on
purchase done by card.
HR Management: For information about employees, salaries, payroll,
deduction, generation of paychecks, etc.
Medical applications: Patients records / history is stored in data base
for quick access.

www.gkmvkalyan.blogspot.com Page 162


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 163 of 240

3) What is database management system? Give an example of DBMS


software.
A DBMS is software that allows creation, definition and
manipulation of database. DBMS provides protection and security to
database.
Example: MySQL, Oracle, Microsoft Access, SQL Server, DB2.

4) Explain the advantages (features) of DBMS.


a. Controlled Data Redundancy
This eliminates duplication of data and saves the storage space.
b. Data sharing
The data stored in the database can be shared among multiple users
or application programs.
c. Data security
Data is highly secured because it permits the data access through
authorized channel.
d. Back-up and Recovery
Database provides backup and recovery subsystem, the user does not
need to back up their data manually, as it allows automatic backup and
recovery of the database.
e. Multiple user interfaces
DBMS provides different types of interfaces such as query languages,
application program interfaces, and graphical user interfaces.
f. Support Multi-Access
Database systems lets multiple users to access the same data from
different locations at the same time. Due to this, the working speed on
the database is increase.

www.gkmvkalyan.blogspot.com Page 163


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 164 of 240

5) Write any two differences between manual data processing and


computerized (electrical) data processing.

6) Write the difference between data and information.


Data: The collection of raw facts and figures is called Data/input.
a) Data is an input for computer.
b) Data is independent.
c) When data is lost, it can't be reproduced.
d) Data is meaningless and valueless.
Information: The processed form of data is called information/output.
a) Information is an output from computer.
b) Information is dependent on data.
c) When information is lost, it can reproduce from data.
d) Information is meaningful and valuable.

www.gkmvkalyan.blogspot.com Page 164


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 165 of 240

7) Explain the database users.


The different DBMS users are
a) Database administrator (DBA)-DBA is responsible for overall
design and monitoring of database.
b) Database designers- Database designers are responsible for
identifying what data to be stored in the database and creating
appropriate structures to store the data.
c) Application programmers and system analysts- These are
the computer professional who implement the specifications
given by the system analysts and develop the application
programs.
d) End users - End users are the actual users who use the
applications developed.

8) Explain physical data independence.


Physical data independence is the ability to modify the physical
schema without causing application programs to be rewritten.
Modifications at the physical level are occasionally necessary to
improve performance.

9) Explain Logical data independence.


Logical data independence is the ability to modify the logical
schema without causing application programs to be rewritten.
Logical Data independence means if we add some new columns or
remove some
columns from table then the user view and programs should not
change.

www.gkmvkalyan.blogspot.com Page 165


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 166 of 240

10) Explain data processing cycle?


Data processing is the activity of collecting the data from various
sources, organized properly and processed to obtain the required
information.

a) Data collection-The required data may exist in different places and in


different forms. All required data items must be gathered together as
first step.
b) Data input-The mechanism of providing the raw data into a data
processing system using a keyboard, mouse or other devices such as
the scanner, microphone and the digital camera
c) Data process-Processing is the series of action or operations on the
input data to generate outputs. Some of the operations involved are
classification, sorting, verification, calculation, summarization,
generating the reports etc.
d) Data output-The result obtained after processing the data must be
checked whether it is according to the requirement or not. The output
can be generated in the form of hard copy or soft copy.
e) Data storage- The result must be stored in the secondary storage
device for future use.
f) Communication – Computers nowadays have communication ability
which increases their power. Data inputted from one place and

www.gkmvkalyan.blogspot.com Page 166


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 167 of 240

processed at another place. Finally the processed data will be


transmitted via email to other locations using network of computers.

11) Define primary and secondary keys


A column or set of columns that uniquely identifies a row within a table
is called primary key.
Secondary key is a candidate key which is not selected as primary key.

12) Define primary key and candidate key.


A column or set of columns that uniquely identifies a row within a table
is called primary key.
Candidate keys are set of fields (columns with unique values) in the
table that are eligible to act as a primary key.

13) Define sequential access, direct access and indexed sequential access
file organizations.
Sequential access: It is a type of file organization in which the records
are arranged one after another in an ascending or descending order of a
particular key field.
Direct access: It is a type of file organization in which the records
are stored and accessed directly using a relative record number.
Indexed sequential access: This file organization combines the
features of both sequential and direct file organization. The records are
stored sequentially, but they can be accessed randomly through an index.

14) Mention any three advantages of random/direct access file


organization.
Advantages of random/direct access file organization are
 The access to and retrieval of records is quick and direct.
 Transactions need not be stored and placed in sequence prior
to processing.
 Best used for online transaction.

www.gkmvkalyan.blogspot.com Page 167


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 168 of 240

15) Write the different symbols used in E-R diagram with their
significance

Name Symbol Description


An entity can be any object,
Entity
place, person or class. It is
represented using rectangles.
An attribute describes a property
Attribute
or characteristic of an entity. It is
represented using ellipse.
A relationship describes relations
Relationship between entities. It is
represented using a diamond.
Weak entity is entity that
Weak Entity depends on another entity. It is
represented by double rectangle.

An attribute can also have their


Composite own attributes. These attributes
Attribute are
known as Composite attribute.

16) Mention any three components of the E-R diagram.


The three main components of the E-R diagram are Entity, Attribute
and Relationship.

www.gkmvkalyan.blogspot.com Page 168


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 169 of 240

17) Mention different database models. Explain any one.


A Database model defines the logical design of data. The model
describes the relationships between different parts of the data.
The three different data models are:
a. Hierarchical Model
b. Network Model
c. Relational Model
a) Hierarchical Model:
 The hierarchical data model is developed by IBM.
 This data model organizes the data in a tree-like structure, in
which each child node can have only one parent node.
 The top of the tree structure consists of a single node that does
not have any parent and is called the root node.
 Each child node can have only one parent node and a parent
node can have any number of (many) child nodes. Therefore it,
represents only one-to-one and one-to-many relationships.

b) Network Model:
 The data is organized in the form of graphs.
 In this model the data is represented by the collection of
records, and relationships among data are represented by
links.
 Each record represents a node. All the nodes are linked to
each other without any hierarchy.

www.gkmvkalyan.blogspot.com Page 169


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 170 of 240

 This database model was used to map many-to-many data


relationships.

c) Relational Model:
 Dr. E.F.Codd first introduced the Relational Database Model.
This model allows data to be represented in a ‘simple row-
column format’. Data is organized in two-dimensional tables
called relations.
 In a table, each row (record) represents an entity and a
column (field) represents an attribute of the entity.
 The relationship between the two tables is implemented
through a common attribute in the tables.
 This makes the querying much easier in a relational database
system.

www.gkmvkalyan.blogspot.com Page 170


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 171 of 240

18) What is data warehouse? Briefly explain its components.


Data warehouse is a repository of an organizations electronically
stored data.
Components of data warehouses:
Data Source: Any electronic repository of information that contain
data for analysis.
Data transformation: Receives data from the data source,
cleaned, standardized and load it into the data repository. It also
called as staging. It can be done manual or using any software.
Reporting: The warehouse is made available to the organization
staff.
Meta data: data about data, which gives the information about the
status of data.
Operations: It is the process of loading, manipulating and
extracting data from data warehouse.

19) What are the advantages of data warehouse?


a) Enhance end-user access to reports and analysis of
information.
b) Increases data consistency.
c) Increases productivity and decreases computing costs.
d) Able to combine data from different sources, in one place.
e) Data warehouses provide an infrastructure that could support
changes to data and replication of the changed data back into
the operational systems.

www.gkmvkalyan.blogspot.com Page 171


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 172 of 240

20) What is the difference between serial and direct access file
organization?

21) What is relationship? Name different types of relationships.


A Relationship which connects entities and represents meaningful
dependencies among them. The rhombus symbol is used to
represent the relationship.
Different types of relationships are:
One to one (1: 1) relationship.
One to many (1 :M) relationship.
Many to one (M: 1) relationship.
Many to many (M: N) relationship.

22) Classify various types of keys used in Database.


The various types of keys used in database are candidate key,
primary key, secondary key, super key and foreign key.

23) Explain ISAM with example


This method combines both the feature of the sequential and random
organizations. Records are accessed by using an index or a table. The
index stores the address of each record corresponding to key number
of the record. The records within the file are stored sequentially but
directly accessed to individual records.
A indexed sequential access method (ISAM) consists of
 The main file storage.
 A table to maintain the index.

www.gkmvkalyan.blogspot.com Page 172


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 173 of 240

An example is illustrated. Using this table (or index, directory), we can


find out the address of any record, given the key value. For example,
the record with key equal to ‘00120’ has the address “1”.

24) What are the advantages and disadvantages of ISAM.


The advantages of disadvantages of index sequential access method
are:
Advantages:
 It combines both sequential and direct.
 Suitable for sequential access and random access.
 Provides quick access to records.

Disadvantages:
 It uses special software and is expensive.
 Extra time is taken to maintain index.
 Extra storage for index files.
 Expensive hardware is required.

25) List the advantages and dis-advantages of sequential or serial file


organization.
Advantages:
a) Simple file design and easy to understand.
b) It uses the inexpensive devices like magnetic tape.
c) It uses the storage space efficiently.
d) Easy to reconstruct the files.

www.gkmvkalyan.blogspot.com Page 173


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 174 of 240

Disadvantages:
a) Entire file must be processed even if a single record is to be
accessed.
b) Transactions have to be sorted before processing.
c) Random enquire is not possible cannot access middle record
directly. Data redundancy is high, as same data can be stored
at different places with different keys.

26) Define and explain the phases of data mining.


The phases start with the raw data and finish with the extracted
knowledge which was acquired as a result of the following stages:
Selection- Selecting or segmenting the data according to some
criteria.
Preprocessing – This is the data cleaning stage where certain
information is removed which may slow down queries.
Transformation – The data even after cleaning are not ready for
mining as we need to transform them into forms appropriate for
mining. The techniques used to accomplish this are smoothing,
aggregation, normalization etc.
Data mining- This stage is concerned with the extraction of
patterns from the data.
Interpretation and Evaluation – The patterns identified by the
system are interpreted into knowledge which can be used to
support human decision-making.

www.gkmvkalyan.blogspot.com Page 174


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 175 of 240

27) Give the Advantage and Dis-advantage of Network Model.

Advantages Dis-advantages
The network data model is that The network data model is that it
a can be quite complicated to
parent node can have many maintain all the links and a single
child broken link can lead to problems
nodes and a child can also have in the database. In addition
many parent nodes. Thus, the the database design can become
network model permits the complex.
modeling of many-to-many
relationships in data.

28) Explain various data types used in DBMS?


Data types of DBMS(Data types in DBMS)
1. Integer – Hold whole number without fractions.
2. Single and double precision – Seven significant value for a number.
3. Logical data type-Store data that has only two values true or false.
4. Characters – Include letter, number, spaces, symbols and
punctuation. size will be one byte.
5. Strings – Sequence of character more than one. Fixed length is 0 to
63Kb and dynamic strings length range from 0 to 2 billion characters.
6. Currency fields – The currency field accepts data in dollar form by
default.
7. Date fields -The date fields accepts data entered in date format.
8. Text fields – Accepts data as an alpha-numeric text string.

www.gkmvkalyan.blogspot.com Page 175


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 176 of 240

29) Explain the concept of Data abstraction. OR


Explain 3-level RDBMS architecture.
The DBMS architecture, the overall database description can be
defined at three levels namely, internal, conceptual, and external
levels.
Internal level: Internal level is the lowest level of data abstraction
which is also known as physical level. It describes how the data is
physically stored and organized on the storage medium.

Conceptual level: This level is also known as logical level. This level
describes what data is stored in the database.

External level: External level is the highest level of abstraction which


is also known as view level. It permits users to access data according
to their needs, so that the same data can be seen by different users in
different ways, at the same time.

www.gkmvkalyan.blogspot.com Page 176


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 177 of 240

25) Explain DBMS Architecture.


The design of a DBMS depends on its architecture. It can be centralized or
decentralized or hierarchical. Database Architecture is of three types:
1-tier DBMS architecture, 2-tier DBMS architecture,3-tier DBMS
architecture.
1-tier DBMS Architecture
In 1-tier Architecture, where the Client,
Server, and Database all reside on the
same machine. Any changes done here will
directly be done on DBMS itself.

2-tier DBMS Architecture


Two-tier Client / Server architecture is used
for user interface program and application
programs that runs on client side.
An application interface ODBC
(Open Database Connectivity) an API which
allows the client-side program to call the
DBMS.

3-tier DBMS Architecture

Three-tier Client / Server database architecture


is commonly used architecture for web applications.
Intermediate layer called Application server or
Web Server stores the web connectivity software
and the business logic (constraints) part of application
used to access the right amount of data from the
database server. This layer acts like medium for
sending partially processed data between the database server and the
client.

www.gkmvkalyan.blogspot.com Page 177


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 178 of 240

26) Discuss file organization with respect to physical data independence.


All schemas are logical and actual data is stored in bit format on the
storage medium. The commonly used file organizations are
➢ Serial
➢ Sequential
➢ Indexed Sequential
➢ Random (or Direct)
Serial File Organization: With serial file organization, records are
arranged one after another in which records are added to the file. Serial
organization is commonly found in the transaction data.
Sequential File Organization: Records are stored one after another in
an ascending or descending order determined by the key field of the
records.
Indexed Sequential Access Method (ISAM): ISAM is the hybrid
between sequential and direct access file organization. The records within
the file are stored sequentially but direct access to individual records is
possible through an index. Indexing permit access to selected records
without searching the entire file.
Random/Direct Access File Organization: Direct access file
organization allow immediate direct access to individual records on the
file. The record are stored and retrieved using a relative record number,
which gives the position of the record in the file.

www.gkmvkalyan.blogspot.com Page 178


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 179 of 240

30) Explain different types of relational keys.


Primary key- A column or set of columns that uniquely identifies a row
within a table is called primary key.
Candidate key- Candidate keys are set of fields (columns with unique
values) in the table that are eligible to act as a primary key.
Alternate keys- The candidate keys which are not considered as primary key
currently is called alternate keys. It is also called has secondary key.
Foreign key- the key that matches the primary key column of another
table.
Composite key-A key that consists of two or more attributes to identify a
record in a table are known as composite keys.

31) Give the advantages and disadvantages of ISAM(Index Sequential


Access Method).
Advantages of Index Sequential Access Method
a) Provides flexibility for users who need both type of access
(sequential file and direct file access) with the same file.
b) It accesses the records very fast if the index table is properly
organized.
c) The records can be inserted in the middle of the file.
Disadvantages of Index Sequential Access Method
a) Indexed sequential access file requires unique keys and
periodic reorganization.
b) Indexed sequential access file takes longer time to search the
index for accessing the data.
c) It requires more storage space.
d) It is expensive because it requires special software.

www.gkmvkalyan.blogspot.com Page 179


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 180 of 240

32) Write the difference between hierarchical data model and network data
model.

Hierarchical Data Model Network Data Model


This data model organizes the This data model organizes the
data in a tree like structure. data in the form of graph.
All the nodes are linked to each All nodes are linked to each
other with a definite hierarchy. other without any hierarchy.
This model is easy to design and It is powerful model, but
simple. database design is complicated.
This model represents the nodes This model has many-to-many
as one-to-one and one-to-many relationships on data.
relationships.
The data access is quite It has one parent node and
predictable in the structure. many child nodes, hence the
data access is easier.

33) Give the Advantage and Dis-Advantage of Hierarchical Model

Advantages Dis-Advantages
The hierarchical data model is The hard coded link is
that the data access is quite established permanently and
predictable in the structure and cannot be modified.
therefore both the retrieval and
updates can be highly optimized
by the DBMS.

www.gkmvkalyan.blogspot.com Page 180


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 181 of 240

Chapter 14: Structured Query Language

One Mark MCQ’s Question and Answer.


(See in MCQ’s Section)
Two Mark Questions and Answers.

1) What is SQL? Or Define SQL.


SQL is Structured Query Language, which is a database language for
storing, manipulating and retrieving data stored in relational database.

2) Classify Numeric and Character string data types in SQL.


Numeric Data Types are: NUMBER, INTEGER, DATE, TIME.
Characters, Strings Data Types are: CHAR, VARCHAR, BOOLEAN.

3) Classify various SQL operators.

Arithmetic operators (+, -, *, / , %)


Comparison operators(=, !=, <>, >, <, >=, <=, !<, !>)
Logical operators (AND, OR, NOT, ALL, ANY, BETWEEN, EXISTS, IN,
LIKE)

4) Which are the logical operators in SQL?


Logical operators (AND, OR, NOT, ALL, ANY, BETWEEN, EXISTS, IN,
LIKE)

5) Mention any two data types used in SQL.


NUMBER, CHAR, VARCHAR, DATE.

6) Give the syntax and example for DELETE command in SQL.


The DELETE statement is used to delete records in a table.
Syntax:
DELETE FROM tablename WHERE condition;
Example:
DELETE FROM gktab WHERE regno=105;

www.gkmvkalyan.blogspot.com Page 181


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 182 of 240

7) Write the syntax for DELETE and INSERT command in SQL.


Syntax for Delete
DELETE FROM tablename WHERE condition;
Syntax for Insert
INSERT INTO tablename VALUES (value1, value2, value3,...);

8) Mention the logical operators used in SQL.


ALL,AND,ANY,BETWEEN,EXISTS,IN,LIKE,NOT,OR,IS NULL,UNIQUE

9) Give the syntax and example of INSERT command in SQL


SYNTAX:
INSERT INTO tablename VALUES (value1, value2, value3,...);
Example:
INSERT INTO gkemp VALUES(101,’Nisarga’,’12-Dec-1989’,’F’);

10) Give the syntax and example of UPDATE command in SQL


UPDATE command in SQL is used to update ALL the rows in a table or
selected set of rows in a table.
To update All the rows in the table.
Syntax: UPDATE tablename SET columnname1=expression1;
Example: UPDATE gktab SET comb=’PCMC’;

To update a specific set of rows in table.


Syntax: UPDATE tablename SET Columnname1=expression1
WHERE Condition;
Example: UPDATE gktab SET Comb=’PCMB’ WHERE
Regno=102;
11) Write the syntax and example for DROP command in SQL
SYNTAX:
DROP TABLE tablename;
Example:
DROP TABLE gktab;

www.gkmvkalyan.blogspot.com Page 182


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 183 of 240

12) Differentiate between DELETE and DROP Commands in SQL

DELETE DROP
DELETE is a Data Manipulation DROP is a Data Definition
Language command. Language command.
DELETE remove some or all the DROP can remove entire
rows from a table. schema, table, domain, or
constraints from the database.
WHERE clause can be used along WHERE clause is not used in
with the DELETE command. DROP command.
Actions performed by DELETE Actions performed by DROP
can be roll-backed. cannot be roll-backed.

13) What is the difference between ORDER BY and GROUP BY clause used
in SQL? Give example for each.

ORDER BY GROUP BY
ORDER BY clause is used to sort GROUP BY clause is used in
the data in ascending or collaboration with the SELECT
descending order, based on one statement to arrange identical
or more columns. data into groups.
Example: Example:
select * from gktab order by select COUNT(*) from gktab
name;
where deptname=’Computer
Science’;

14) Write the syntax for distinct command in SQL.


SYNTAX:
SELECT DISTINCT columnname FROM Tablename;
Example:
SELECT DISTINCT Course from gktab;

www.gkmvkalyan.blogspot.com Page 183


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 184 of 240

15) What is the use of NULL value in SQL?


The SQL NULL is the term used to represent a missing value. A field
with a NULL value is a field with no value.

16) What is dual table?


This is a single row and single column dummy table provided by oracle.
This is used to perform mathematical calculations without using a
table.

17) Give the syntax and Example for Alter command in SQL.
The ALTER TABLE statement is used to add, delete, or modify columns
in an existing table.
a) ALTER TABLE - ADD Column
To add a column in a table, use the following syntax:
ALTER TABLE tablename ADD NewColumnname Datatype(size);
Example
ALTER TABLE gktab ADD Email varchar(60);

b) ALTER TABLE - DROP COLUMN


To delete a column in a table, use the following syntax:
ALTER TABLE tablename DROP COLUMN Columnname;
Example
ALTER TABLE gkemp DROP COLUMN Email;

c) ALTER TABLE - ALTER/MODIFY COLUMN


To change the data type of a column in a table, use the following syntax:
ALTER TABLE tablename MODIFY Columnname datatype (size);
Example
ALTER TABLE gkStud MODIFY Course varchar(20);

www.gkmvkalyan.blogspot.com Page 184


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 185 of 240

18) What are the features of SQL?


a) Querying data.
b) Inserting, updating, and deleting rows in a table.
c) Creating, replacing, altering, and dropping objects (tables).
d) Controlling access to the database and its objects (tables).
e) Guaranteeing database consistency and integrity.

19) What is create view command?


The syntax for creating a view is as follows:
CREATE VIEW view_name AS
SELECT column1, column2.....
FROM table_name
WHERE [condition];
Example
CREATE VIEW vstudtab AS
SELECT Name, Comb
FROM gkstudtab
Where Comb=’PCMC’;

20) What is commit command?


The commit command is used to save the transactions entered into the
table.

21) Explain DDL commands in SQL.

www.gkmvkalyan.blogspot.com Page 185


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 186 of 240

22) Mention DCL(Data Control Language) commands.


GRANT command: It is used to provide access or privileges on the
database objects to the users.
REVOKE command: It removes user access right or privileges to
database objects.

Five Mark Questions and Answers.

1) Explain the various group functions in SQL. (OR) What are group
functions in SQL? Explain group functions with example.

Group functions are built-in functions in SQL that operate on groups of


rows and return one value for the entire group.

These functions are: COUNT, MAX, MIN, AVG, SUM, DISTINCT

a) COUNT(): If you want the number of employees working in a Computer


department.

SELECT COUNT(*) from employee WHERE dept=’Computer’;

b) MAX(): This function is used to get the maximum value from a column.

SELECT MAX(salary) FROM employee;

c) MIN(): This function is used to get the minimum value from a column.

SELECT MIN(salary) FROM employee;

d) AVG():This functions is used to get average value of a numeric column.


SELECT AVG(salary) FROM employee;

e) SUM(): This function is used to get the sum of a numeric column.

SELECT SUM(salary) FROM employee;

f) DISTINCT(): It is used to select the distinct (unique) rows.

SELECT DISTINCT dept FROM employee;

www.gkmvkalyan.blogspot.com Page 186


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 187 of 240

2) Explain arithmetic operators in SQL.


Consider a=10 and b=20

3) Explain different types of SELECT command in SQL.

a) It displays full contents of a table.


select * from gkstudent;

b) It displays a record of a student whose register number is 101.


select * from gkstudent where regno=101;

c) If you want to sort the names in alphabetic order.


select * from gkstudent order by name;

d) If you want to select only regno, name, comb.


select regno, name, comb from gkstudent;

e) It eliminate all the duplicate records and fetching only unique


records.
select Distinct comb from gkstudent;

www.gkmvkalyan.blogspot.com Page 187


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 188 of 240

4) Explain SQL data types with example.

Each column in a database table is required to have a name and a data


type.
SQL developers have to decide what types of data will be stored inside
each and every table column when creating a SQL table.

5) Describe any five logical operators available in SQL.

www.gkmvkalyan.blogspot.com Page 188


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 189 of 240

6) Explain any five relational/ Comparison operators in SQL with suitable


examples.

7) Expand SQL. Give the syntax and example for INSERT and DELETE
command in SQL

SQL stands for Structure Query Language.

INSERT Command

Syntax:
INSERT INTO tablename VALUES(value1, value2, value3,...);

Example:
INSERT INTO gkemp VALUES(101,’Nisarga’,’F’);

DELETE Command
Syntax:
DELETE FROM tablename WHERE condition;

Example:
DELETE FROM gkemp WHERE empid=105;

www.gkmvkalyan.blogspot.com Page 189


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 190 of 240

8)Explain SQL constraints with example.

Constraints are the rules enforced on data columns on table. These are
used to limit the type of data that can go into a table. This ensures the
accuracy and reliability of the data in the database.
The constraints available in SQL are Primary Key, Foreign Key, Not Null,
Unique and Check.
▪ PRIMARY KEY: A primary key is a field which can uniquely identify
each row in a table.
▪ FOREIGN KEY: A foreign key is a field in a relational table that
matches the primary key column of another table.
▪ NOT NULL: This constraint tells that we should have values
compulsorily to this column.
▪ UNIQUE: This constraint tells that all the values in the column must
be unique. That is, the values in any row of a column must not be
repeated.
▪ CHECK: This constraint helps to validate the values of a column to
meet a particular condition. That is, it helps to ensure that the value
stored in a column meets a specific condition.

Example:
create table gkpk(regno number(3) primary key,
name varchar(20) not null,
adharno number(12) unique,
age number(3) check (age>3));

create table gkfk(regno number(3) references gkpk(regno),


comb char(4));

www.gkmvkalyan.blogspot.com Page 190


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 191 of 240

9) What is Data Definition Language? Give the functions of Data Definition


Language.
Data Definition Language (DDL) are the set of SQL commands used to
CREATE, ALTER, DROP or TRUNCATE the database structure or schema.
The Functions of Data Definition Language:
a. DDL defines the physical characteristics of each record. That means
it
specifies field name, data type, length and also relationships among
those records.
b. DDL describes the schema and sub-schema.
c. DDL indicates keys of the record.
d. DDL specifies associative related records or fields
e. DDL provides data security measures.
f. DDL provides logical and physical data independence.

10) Discuss any five character (text) built-in functions in SQL.

www.gkmvkalyan.blogspot.com Page 191


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 192 of 240

11) What is data definition language? Explain UPDATE and SELECT


command.
Data Definition Language (DDL) are the set of SQL commands used to
Create, Alter or Drop the database structure or schema.
UPDATE Command
UPDATE command in SQL is used to update ALL the rows in a table or
selected set of rows in a table.
To update All the rows in the table.
Syntax: UPDATE tablename SET columnname1=expression1;
Example: UPDATE gktab SET comb=’PCMC’;

To update a specific set of rows in table.


Syntax: UPDATE tablename SET Columnname1=Expression1
WHERE Condition;
Example: UPDATE gktab SET Comb=’PCMB’ WHERE Regno=102;

SELECT Command
The SELECT statement is used to fetch the data from a database table
which returns this data in the form of a result table.
Syntax:
SELECT column1, column2 ...columnN FROM tablename WHERE
Condition;
Example:
a) If you want to select all the fields available in the table.
SELECT * FROM gktab;
b) If you want to sort the names in alphabetic order.
SELECT * FROM gktab ORDER BY name;
c) If you want to select specific columns like regno, name from the
table.
SELECT regno, name FROM gktab;

www.gkmvkalyan.blogspot.com Page 192


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 193 of 240

12) Write the differences between order by and group by with example.

13) What is DDL? Explain any two DDL commands used in SQL.

DDL is known as Data Definition Language. DDL defines the conceptual


schema providing a link between the logical and the physical structures of
the database.

DDL Commands are CREATE, ALTER, DROP.

CREATE Command

CREATE command is used to create a table in SQL.

www.gkmvkalyan.blogspot.com Page 193


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 194 of 240

ALTER Command

ALTER command is used to add, delete, or modify columns in an existing


table.

DROP Command

DROP command is used to delete the table permanently from the


database.

14) What is DML? Explain any two DML commands used in SQL.

DML provides the data manipulation techniques like selection, insertion,


deletion, update, modification, replacement, retrieval, sorting and display
of data or records.
DML Commands are INSERT, UPDATE, DELETE, SELECT.

www.gkmvkalyan.blogspot.com Page 194


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 195 of 240

INSERT Command

INSERT command is used to add new rows of data into a table

UPDATE Command

UPDATE command is used to modify the existing records in a table.


The below UPDATE command is used to modify the specific row in a table.

The below UPDATE command is used to modify the all the rows in a table.

www.gkmvkalyan.blogspot.com Page 195


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 196 of 240

DELETE Command

DELETE command is used to delete the existing records from a


table.

The below DELETE command is used to delete the specific row in a table.

The below DELETE command is used to delete all the rows in a table.

SELECT Command

SELECT statement is used to fetch the data from a database table.

The below SELECT command displays all rows and columns from the
table.

The below SELECT command displays only few selected columns


from the table

www.gkmvkalyan.blogspot.com Page 196


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 197 of 240

The below SELECT command displays all the column and specific
row(s) from the table.

15) Write the SQL command to develop following table also find Total,
Maximum and Minimum marks in the table.

create table student(RegNo number(3),Name varchar2(50),


sub1 number(3),sub2 number(3),sub3 number(3), total number(3),
max_mark number(3), min_mark number(3));

insert into student (Reg,Name,sub1,sub2,sub3)


values(101,'ABC',89,67,99);
insert into student (Reg,Name, sub1,sub2,sub3)
values(102,'PQR',90,93,92);
insert into student (Reg,Name, sub1,sub2,sub3)
values(103,'WXY’,91,99,100);

www.gkmvkalyan.blogspot.com Page 197


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 198 of 240

update student set total = (sub1+sub2+sub3);


update student set max_mark = greatest(sub1,sub2,sub3);
update student set min_mark = least(sub1,sub2,sub3);

select * from student;

www.gkmvkalyan.blogspot.com Page 198


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 199 of 240

16)

Answer:

*****

www.gkmvkalyan.blogspot.com Page 199


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 200 of 240

UNIT-D

www.gkmvkalyan.blogspot.com Page 200


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 201 of 240

CHAPTER-15 Networking Concepts


One Mark MCQ’s Question and Answer.
1) Define Networking?
Networking is a collection of independent computers that
communicate with each other and able to share the resources.

2) What is server?
Server is a main computer which facilitates sharing of resources and
service in a network.

3) What is client?
A client is a computer attached to a network and seeking the
services from the server.

4) What is topology?
The actual appearance or layout of network is called network
topology.

5) Expand 2G.
Second-Generation cellular technology.

6) What is a virus?
Virus is a malicious program that is designed to infect the host
program and gain control over the system without the owner's
knowledge.

7) What is chatting?
It is the method of online communication by typing text messages
which can be instantly received by the recipient and he can respond
back at the same time.

8) What is cyber law?


Cyber Law is refers to all the legal and regulatory aspects of
internet and the WWW.

9) What are cookies?


Cookies are messages that a web server transmits to a web browser
so that a web server can keep track of the user’s activity on a
specific web site.

www.gkmvkalyan.blogspot.com Page 201


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 202 of 240

10) What are Hackers?


Hackers are more interested in gaining knowledge about computer
systems and possibly using this knowledge for play full pranks.

11) Expand FTP.


File Transfer Protocol, It is used to transfer of computer files
between a client and server on a computer network.

12) Define bus topology.


Bus topology is a network type in which every computer and
network device is connected to single cable. It transmits the data
from one end to another in single direction.

13) Define Local Area Networking.


A local-area network (LAN) is a computer network that spans a
relatively small area. LAN is confined to a single room, building or
group of buildings or campus, of up to a few kilometers in size.

14) Give an example for full duplex communication mode.


Telephone

15) What is Hub?


A hub is a hardware device used to connect several computers
together.

16) Expand HTTP.


Hypertext Text Transfer Protocol

17) Write any one application of computer network.


File sharing, Printer sharing, E-mail, Server-Client model, Sharing
database.

18) Mention any one anti-virus software,


Norton, MacAfee, Quick Heal, AVG, AVAST, Kaspersky.

19) What is Wide Area Network(WAN)?


WAN spans a large geographical area, often a country or a continent
and uses various commercial and private communication lines to
connect computers. Typically, a WAN combines multiple LANs that
are geographically separated.

www.gkmvkalyan.blogspot.com Page 202


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 203 of 240

20) What is ring topology?


In the ring network topology, the workstations are connected in a
closed loop configuration. Adjacent pairs of workstations are directly
connected. Other pairs of workstations are indirectly connected.

21) What is star topology?


A star network features a central connection point called a "hub
node" to which all other nodes are connected by a single path. Each
node has a dedicated set of wires connecting it to a central network
hub.

22) What is a Firewall?


A system designed to prevent unauthorized access to or from a
private network is called firewall.

23) Name the first Computer Network.


Advanced Research Projects Agency Network(ARPANET).

24) What is SIM card?


The SIM(Subscriber Identity Module) is a chip card that gives a
cellular device its unique phone number.

25) Expand GSM.


Global System for Mobile communications

26) What is CDMA?


CDMA is Code Division Multiple Access
A digital cellular technology that uses spread spectrum techniques.

27) What is GPRS?


GPRS is the abbreviation for General Packet Radio Service.
GPRS is used for wireless communication using a mobile device.
With this service you can access the internet, send emails and large
data

28) Name any one type of UTP cable.


CAT

29) Mention the types of networking.

Local Area Networks (LANs)


Wide Area Networks (WANs)
Metropolitan Area Networks (MANs)

www.gkmvkalyan.blogspot.com Page 203


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 204 of 240

Two Mark Questions and Answers.

1. Explain any two types of communication modes or transmission modes.

The communication mode is the technique of transmitting and receiving


signals between the sender and receiver.

They are Simplex, Half Duplex and Full Duplex.

Simplex Mode

In simplex mode, the communication occurs in one direction only. The


sender can only send data and cannot receive it.

Example: Television, Radio.

Half-Duplex Mode

In half-duplex mode, the communication can be done in both direction but


only one direction at a time(not simultaneously).

Example: walkie talkie.

www.gkmvkalyan.blogspot.com Page 204


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 205 of 240

Full Duplex Mode

In Full Duplex mode, the communication can be done in both directions at


the same time. When one device is sending data the other device can
receive and send the data also.

Example: Telephone Network.

2. Classify and explain servers.

A server is a computer program that provides services to other computer


programs (and their users) in the same or other computers.

Servers can be broadly classified into Dedicated servers and Non-


dedicated servers.

1. Dedicated servers: A computer exclusively reserved for the server’s


job and its only job is to help workstations to access data, software
and hardware resources.
For example, within a network, you could have a computer dedicated
to printer resources, another computer dedicated to Internet
connections, another computer serving as a firewall, etc. These
computers would all be dedicated servers, as the whole computer is
allocated for a specific task within the network.

2. Non-dedicated servers: A computer in a network acts as a server as


well as a workstation is called a non-dedicated server. It is server
upon which applications are available, and also network management
software runs in the background. Non-dedicated servers are common
in peer-to-peer networks. It is composed entirely of workstations that
can be set up to share some of their services, like printers or files.
These computers require more memory and work slower. It is suitable
for small networks.

www.gkmvkalyan.blogspot.com Page 205


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 206 of 240

3. What is GPRS technology?


GPRS is the abbreviation for General Packet Radio Service.
GPRS is used for wireless communication using a mobile device.
With this service you can access the internet, send emails and large data.

4. List the differences between simplex, half duplex and full duplex.

www.gkmvkalyan.blogspot.com Page 206


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 207 of 240

5. List any two goals/advantages of computer network.


The network goals are as listed below.
(i) Resource Sharing: The aim is to make all the programs, data and
peripherals available to anyone on the network.
(ii) Reliability: A file can have copies on two or more different machine,
so if one of them is unavailable the other copies could be used.
(iii) Cost Factor: Using network we can reduce cost by sharing system
resources.
(iv) Communication Medium: Computer networks provide a powerful
communication medium. A file that was updated or modified on a network
can be seen by the other users on the network immediately.

6. Explain the cables and different types of cables used in transmission?


Networking cables are networking hardware used to connect two or more
computers to share devices such as printers or scanners. Different types
of network cables are twisted pair cables, coaxial cable and optical fiber
cable are used.
Twisted Pair Cable:
It consists of 2 separately insulated conductor wires twisted together to
improve electromagnetic compatibility. These are the most widely used
transmission medium cables. These are packed together in protective
sheaths. They reduce electromagnetic radiation from pairs and crosstalk
between the neighboring pair. These are further subdivided into
unshielded and shielded twisted pair cables.

Unshielded Twisted Pair Cable(UTP): These consist of two insulated


copper wires that are coiled around one another. These types of
transmission media block interference without depending on any physical
shield. The unshielded twisted pair are very affordable and are simple to
set up. These provide a high-speed link.

www.gkmvkalyan.blogspot.com Page 207


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 208 of 240

Shielded Twisted Pair (STP): This twisted cable consisted of a foil shield to
block external interference. The insulation within these types of the
twisted cable allow greater data transmission rate. These are used in fast-
data-rate Ethernet and in data and voice channels of telephone lines.
Coaxial Cable:
This cable contains an external plastic cover and it includes two parallel
conductors where each conductor includes a separate protection cover.
This cable is used to transmit data in two modes like baseband mode as
well as broadband mode. This cable is widely used in cable TVs & analog
TV networks.
The advantages of the coaxial cable include high bandwidth, noise
immunity is good, low cost and simple to install.
Optical Fiber Cable:
It uses electric signals to transmit data. At the centre is the glass core
through which light propagates. It is used for large volume data
transmission. Fiber optic cable has bandwidth more than 2 gbps
(Gigabytes per Second)
The main advantages of this cable include lightweight, capacity &
bandwidth will be increased, signal attenuation is less, etc. The
disadvantages are high cost, fragile, installation & maintenance is difficult
and unidirectional.

www.gkmvkalyan.blogspot.com Page 208


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 209 of 240

Five Mark Questions and Answers.

1) What is networking? Explain the goals of networking.


Networking is a collection of independent computers that
communicate with each other and able to share the resources.
The network goals are as listed below.
a) Resource Sharing: The aim is to make all the programs, data
and peripherals available on the network.
b) Reliability: A file can have copies on two or three different
machines stored, so if one of them is unavailable, the other
copies can be used. For military, banking and many other
applications it is great of importance.
c) Cost effective: Personal computers have better
price/performance ratio, so it is better to have PC’s, one per user
with data stored on one shared file server machine.
d) Communication Medium: Computer networks provide a
powerful communication medium. A file that was updated or
modified on a network can be seen by the other users on the
network immediately.

www.gkmvkalyan.blogspot.com Page 209


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 210 of 240

2) Explain any five network devices.

a) Modem (Modulator and Demodulator)


This device converts digital data to analog form and analog data to
digital form.
b) Hub
A device that connects multiple computers in a network.
c) Repeater
A repeater is an electronic device that receives a signal , amplifies it
and then retransmits it on the network so that the signal can cover
longer distances.
d) Bridge
It is a device used to connect two networks of the same type and it
transmits the data to the correct destination.
e) Router
A Router is a network device that works like a bridge to establish
connection between two networks but it can handle networks with
different protocols.
f) Gateway
A gateway is a network device that establishes an intelligent
connection between a local network and external networks with
completely different structures i.e. it connects two dissimilar networks.
g) Ethernet Card
An Ethernet card is a kind of network adapter and is also known as
Network Interface Card (NIC). These adapters support the Ethernet
standard for high-speed network connections via cables.
h) RJ-45
RJ-45 , short form of Registered Jack - 45, is an eight wired connector
that is used to connect computers on a local area network(LAN),
especially Ethernet. RJ-45 connectors look similar to the RJ-11
connector used for connecting telephone equipment, but they are
somewhat wider.
i) Wi-Fi Card
A small, portable card that allow your computer to connect to the
internet through a wireless network.
j) Switch
It is a device that is used to segment networks into different sub
networks.

www.gkmvkalyan.blogspot.com Page 210


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 211 of 240

3) What are the applications in networking?


SMS: Short Message Service (SMS) is the transmission of short text
messages to and from a mobile phone.
Chat: It is the process of instantaneous communication.
Video Conferencing: Two way videophone conversations is called
Video conferencing.
Wi-Fi: Wi-Fi refers to Wireless Fidelity, which lets you connect to
the internet without a direct line from your PC to the ISP.
Wi-Fi Hotspot. A hotspot is a venue that offers Wi-Fi access.
WiMax: WiMax is a wireless digital communications system.

4) What is computer virus? Give the symptoms (characteristics) of


computer virus.
Computer virus is a malicious program that can spread from
computer to computer and they can replicate themselves
The following are characteristics/ Symptoms of a computer virus.
a) A Computer may respond slowly.
b) Disk drives are not accessible.
c) System shutdown.
d) Disappearing of files from system.
e) Computer stops responding.
f) Applications are not working properly.
g) It creates multiple / duplicate files.
h) Reduce the memory size.

www.gkmvkalyan.blogspot.com Page 211


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 212 of 240

5) Explain the types of Viruses.


File Infectors – These types of viruses either infect executable
files or attach themselves to a program file and create duplicate
files.
Boot Sector Viruses – Install themselves on the beginning tracks
of a hard drive or the Master Boot Record or simply they change the
pointer to an active boot sector.
Macro Viruses – Infect data files like electronic spreadsheets or
databases of several software packages.
Network Viruses – These virus use protocols and commands of
computer network to spread themselves on the network. Generally
they use email or any data transfer files to spread themselves on
the network.

6) Give the measures for preventing virus.


a. Never use external disk or CD without scanning for viruses.
b. Always scan files downloaded from internet.
c. Never boot the computer from floppy unless it is virus free.
d. Use licensed software.
e. Write protect your disk.
f. Install and use antivirus software.
g. Keep antivirus software up to date.

www.gkmvkalyan.blogspot.com Page 212


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 213 of 240

7) Explain network securities in detail. OR What is Network Security?


Mention and explain protection methods.
Network security is the process of providing security to the
networking devices and the data stored over a network.
There are different methods of protection
1) Authorization: It determines whether the service provider has
granted access for the web service to the user.
2) Authentication: Authentication is termed as password
protection as the authorized user is asked to provide a valid
password.
3) Encrypted smart card: An encrypted is hand held smartcard
that can generate a token that a computer system can recognize.
4) Biometric System: The biometric system involve some unique
aspects of a person’s body such as figure prints, retinal patterns etc
to establish his/her identity.
5) Firewall: Firewall is software to prevent unauthorized access to
or from a private network.

8) Write a note on network topologies.


The actual appearance or layout of network is called network
topology.
There are five basic topologies BUS, STAR, TREE, RING, MESH

www.gkmvkalyan.blogspot.com Page 213


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 214 of 240

Bus Topology
Bus topology is also known as Linear Topology. In this type of topology,
each node attaches directly to a common cable which acts as the
backbone onto which the various nodes are attached.
Star Topology
In this topology each node is connected directly to the central computer.
All the communications between the nodes have to pass through central
computer.
Tree Topology
Tree topology is a combination of bus and star topology. The network
looks like an inverted tree with the central root branching and sub-
branching down to the nodes.
Ring Topology
In ring topology, each host machine connects to exactly two other
machines, creating a circular network structure. When one host tries to
communicate or send message to a host which is not adjacent to it, the
data travels through all intermediate hosts.
Mesh Topology
In this topology, each node is connected to more than one node to
provide an alternative root in the case the host is either down or too
busy.

9) Explain the different switching techniques in detail.


Switching techniques are employed to provide communication
between two computers.
There are basically three types of switching methods available.
a) Circuit Switching.
b) Message Switching
c) Packet Switching.

www.gkmvkalyan.blogspot.com Page 214


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 215 of 240

a) Circuit Switching
When a dedicated path is established for data transmission between
sender and receiver, it is called circuit switching. When any network node
wants to send data, a call request signal is sent to the receiver and
acknowledged back to ensure availability of dedicated path. This
dedicated path is then used to send data. ARPANET used circuit switching
for communication over the network.

b) Message Switching
In this techniques the message is transmitted through the network node
to node, each node receives the entire message stores it and then is
transmitted to the next node due to that, this type of network is called as
store and forward. The device needs the sufficient storage capacity to
buffer the message.

c) Packet Switching
Packet Switching is one of the switching techniques in which messages
are divided into packets before they are sent. Each packet is then
transmitted individually and can even follow different routes to its
destination. Once all the packets arrived at the destination, they are
recompiled into the original message.

10) Explain the types of Networking?


Types of Computer Networks
 LAN (Local Area Network)
 MAN (Metropolitan Area Network)
 WAN (Wide Area Network)
 PAN (Personal Area Network)

www.gkmvkalyan.blogspot.com Page 215


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 216 of 240

Local Area Network (LAN)


A Local Area Network (LAN) is a group of computer and peripheral
devices which are connected in a limited area such as school, labs,
home, and office building. LANs can also extend to a few kilometers
when used by companies, where a large number of computers share a
variety of resources like hardware (e.g. printers, scanners, audiovisual
devices etc), software (e.g. application programs) and data. LAN will
be used as one type of transmission medium. It is a network which
consists of less than 5000 interconnected devices across several
buildings.
Metropolitan Area Network (MAN)
A Metropolitan Area Network or MAN is consisting of a computer
network across an entire city, college campus, or a small region. This
type of network is large than a LAN, which is mostly limited to a single
building or site. Depending upon the type of configuration, this type of
network allows you to cover an area from several miles to tens of
miles. MAN, which can support both data and voice might even be
related to local cable television network.
Wide Area Network (WAN)
WAN (Wide Area Network) covers a large geographic area such as
country, continent or even whole of the world. WAN network system
could be a connection of a LAN which connects with other LAN’s using
telephone lines and radio waves. Sometimes they can be connected
through leased lines or satellites.
PAN (Personal Area Network)
PAN (Personal Area Network) is a computer network formed around a
person. It generally consists of a computer, mobile, or personal digital
assistant. PAN can be used for establishing communication among
these personal devices for connecting to a digital network and the
internet.

www.gkmvkalyan.blogspot.com Page 216


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 217 of 240

11) Explain OSI Reference Model

The Physical Layer


The physical layer is concerned with transmitting raw bits over a
communication channel. It also deals with mechanical, electrical and
timing interfaces.
The Data Link Layer
The main function of the data link layer is to transform a raw transmission
facility into a line that appears free of undetected transmission errors to
the network layer.
The Network Layer
The network layer controls the operation of the subnet. The main function
is to determine how packets are routed from source to destination.
The Transport Layer
The basic function of transport layer is to accept data from above layer
and split it up into smaller units if needed, and pass these to the network
layer and ensure that the pieces all arrive correctly at the other end.

www.gkmvkalyan.blogspot.com Page 217


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 218 of 240

The Session Layer


The session layer allows users on different machines to establish sessions
between them.
The Presentation Layer
The presentation layer concerned with the syntax and semantics of the
information transmitted.
The Application Layer
The application layer contains a variety of protocols that are commonly
needed by the user.
For example, HTTP (Hyper Text Transfer Protocol) which is
the bases for the World Wide Web (WWW) to access web pages.

www.gkmvkalyan.blogspot.com Page 218


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 219 of 240

CHAPTER-16 Internet and Open Source Concepts


One Mark MCQ’s Question and Answer.

1) What is freeware?
A freeware is an application software that is available free of cost and
which allows copying and further distribution, but not modification and
whose source code is not available.

2) Define E-Commerce.
E-commerce is the trade of goods and services with the help of
Telecommunication and computers.

3) Expand WWW.
World Wide Web

4) Give the general syntax of URL.


URL’s looks like
type://address/path

Where type: specifies the type of the server in which the file is located,
address is the address of server, and path tells the location of file on the
server.
For example, in the following URL

Example:
http://www.pue.kar.nic.in/results.asp
a) The type of server or protocol.
b) The name or address of the server on the Internet.
c) The location or path of the file on the server

5) What is open source software?


Open Source Software, which refers to software whose source code is
available to customers and it can be modified and redistributed without
any limitations.

www.gkmvkalyan.blogspot.com Page 219


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 220 of 240

6) What is free software?


Free software means the software is freely accessible and can be freely
used, changed, improved, copied and distributed by all who wish to do so.

7) What is OSS and FLOSS?


OSS refers to Open Source Software, which refers to software whose
source code is available to customers and it can be modified and
redistributed without any limitations.
FLOSS refers to Free Libre and Open Source Software or to Free Livre
and
Open Source Software. The term FLOSS is used to refer to software
which is both free software as well as open source software.
8) What is Proprietary software?
Proprietary Software is the software that is neither open nor freely
available.Proprietary software is software that is owned by an
individual or a company. There are almost always major restrictions on
its use, and its source code is almost always kept secret.
9) What is domain name?
Domain name are used to identify one or more ip addresses.
10) Expand IPR.
Intellectual Property Rights.

11) Define the term Web page.


A web page is a web document that is suitable for the World Wide Web
and the web browser. Generally it contains text, pictures, videos etc.,
12) Define the term WWW
The WWW (World Wide Web) is a set of protocols that allows you to
access any document on the net through a naming system based on
URLs.
13) What is Telnet?
Telnet is an older Internet Utility that lets you log on to remote
computer systems.

www.gkmvkalyan.blogspot.com Page 220


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 221 of 240

14) What is Domains?


The domain is the name that identifies a computer on the internet.

Three Mark Questions and Answers.

1) What is a web browser? Mention any two web browsers


A web browser is a software application for accessing information on
the World Wide Web. When a user requests a particular website, the
web browser retrieves the necessary content from a web server and
then displays the resulting web page on the user's device.
Examples: Internet Explorer, Google Chrome, Mozilla Firefox,
Netscape navigator, Opera etc.

2) What is web browser, web server and web page?


A web browser is a software application for accessing information
on the World Wide Web. When a user requests a particular website,
the web browser retrieves the necessary content from a web server
and then displays the resulting web page on the user's device.
web server is a WWW server that responds to the requests made
by web browsers.
web page: The documents residing on web sites are called Web
Pages.

3) Mention different types of protocol.


a) File Transfer Protocol (FTP)
b) Transmission Control Protocol/Internet Protocol (TCP / IP)
c) Hyper Text Transfer Protocol (HTTP)
d) Post Office Protocol (POP)
e) Simple Mail Transfer Protocol (SMTP)
f) Network News Transfer Protocol (NNTP)

www.gkmvkalyan.blogspot.com Page 221


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 222 of 240

4) What is meant by shareware? Write its limitation.


Shareware is commercial software that is distributed free to users,
either in a limited format or on a trial basis that expires after a set
number of days, and then a license fee should be paid.
Limitations.
(i) In shareware the source code is not available
(ii) Modifications to the software are not allowed.

5) Define E-commerce. Write the various technologies and services


used in E-commerce.(OR) Give the services of E-commerce.
E-commerce is the trade of goods and services with the help of
telecommunication and computers.

Services used in e-commerce


a) Electronic Data Interchange (EDI)
b) e-mail
c) Electronic Fund Transfer(EFT)
d) Electronic Benefits Transfer (EBT)
e) Electronic forms (Online applications forms)
f) Digital Cash
g) Bar coding, imaging, voice recognition
h) Bulletin Boards
i) Electronic Banking/Net Banking

6) Write advantages of e-commerce.


a) Global participation.
b) Optimization of resource.
c) 24X7 business service.
d) Reduce time to complete business transaction.
e) Online shopping is more convenient and time saving.
f) Faster service at door step.
g) Improved market intelligence.

www.gkmvkalyan.blogspot.com Page 222


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 223 of 240

7) Mention the Disadvantages of e-commerce


a) Limited internet access in some countries/Town.
b) EDI standards have to be implemented.
c) It is not possible to get real feeling of shopping.
d) Security issue.

8) Explain any three types of e-commerce or


Explain the types of e-commerce applications.
a) Business-to-Business(B2B): The exchange of
services, information and / or products form one business to
another
business partners. Example: E-bay.com
b) Business-to-Consumer(B2C): The exchange of services,
information and/or product from a business to a consumer.
Example: Buying a computer or mobile from the company.
c) Consumer-to-Business(C2B): Customer directly
contact with business vendors by posting their project work with set
budget online so that the needy companies review it and contact
the customer directly with bid. Example: guru.com, freelancer.com
d) Consumer-to-Consumer(C2C): The exchange of services,
information and /or products from one consumer to another
consumer.
Example: OLX.com is the recent and mostly used service.

www.gkmvkalyan.blogspot.com Page 223


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 224 of 240

9) Explain any three open source software criteria?


The distribution terms of open source software must comply with
the following criteria.
a) Free redistribution: The license shall not restrict any party
from selling or giving away the software as a component of an
aggregate software distribution containing programs from
several different sources.
b) Source Code: The program must include source code and
must allow distribution in source code as well as complied
form.
c) No discrimination against persons or groups: The license must
not discriminate against any person or group of persons.

10) What is Open source? Or Write a Note on Open Source.


Open source software (OSS) is software that is distributed with its
source code, making it available for use, modification, and
distribution with its original rights. Programmers who have access
to source code can change a program by adding to it, changing it,
or fixing parts of it that aren’t working properly. OSS typically
includes a license that allows programmers to modify the software
to best fit their needs and control how the software can be
distributed.

11) Write the advantages of www?


a) Availability of mainly free information.
b) Reduces the costs of information.
c) The same protocol of communication can be used for all the
services.
d) Provide rapid interactive communication.
e) Provides the exchange of huge volumes of data.

www.gkmvkalyan.blogspot.com Page 224


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 225 of 240

12) What is Telnet?


TELNET (TELecommunication NETwork) is a network protocol
developed in 1969, used on the Internet or local area network
(LAN). The telnet provides access to a command-line, interface on a
remote host by means of a virtual terminal.
To start a Telnet session, we must log in to a server by entering a
valid username and password. Telnet is a common way to remotely
control Web servers.

13) Explain free software?


Free software means the software is freely accessible and can be
freely used, changed, improved, copied and distributed by all who
wish to do so and doesn’t have to be paid. Free in Free Software is
referring to freedom, not price.
In particular, four freedoms define Free Software:
a) The freedom to run the program, for any purpose.
b) The freedom to study how the program works, and adapt it to
your needs.
c) The freedom to redistribute copies so you can help your
neighbor.
d) The freedom to improve the program, and release your
improvements to the public, so that the whole community
benefits.

14) Explain URL.


The Internet structure of the World Wide Web is built on a set of
rules called Hypertext Transfer Protocol (HTTP) and a page
description language called Hypertext Markup Language (HTML).
HTTP uses internet addresses in a special format called a Uniform
Resource Locator or URL.
URLs look like this:
type://address/path

www.gkmvkalyan.blogspot.com Page 225


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 226 of 240

Where type: specifies the type of the server in which the file is
located.
address is the address of server.
path tells the location of file on the server.
For example, in the following URL

http://www.pue.kar.nic.in/results.asp

http: specifies the type of server,


pue.kar.nic.in is the address of server, and
results.asp is the path of the file.

15) Explain the IPR in India.


Intellectual Property Rights (IPR), very broadly, are rights granted
to creators and owners of works that are results of human
intellectual creativity. These works can be in the industrial,
scientific, literary and artistic domains, which can be in the form of
an invention, a manuscript, a suite of software, or a business name.

It administers all matters relating to patents, designs, trademarks,


and geographical indications and also directs and supervises the
functioning of:
The Patent Office (including Designs Wing)
The Patent Information System (PIS)
The Trade Marks Registry (TMR), and
The Geographical Indications Registry (GIR)

IPR plays a key role in almost every sector and has become a
crucial factor for investment decisions by many companies. All the
above Acts and regulations are at par with international standards.
India is now TRIPS-compliant. This is an international agreement
administered by the World Trade Organization (WTO), which sets
down minimum standards for many forms of intellectual property

www.gkmvkalyan.blogspot.com Page 226


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 227 of 240

(IP) regulations as applied to the nationals of other WTO Members.


The very wellbalanced IPR regime in India acts as an incentive for
foreign players to protect their Intellectual Property in India.

16) How ecommerce works?


Step 1: The merchant submits a credit card transaction to the
NMAPAY Payment gateway on behalf of a customer via secure Web
site connection, retail store, MOTO center or wireless device.
Step 2: NMAPAY receives the secure transaction information and
passes it via a secure connection to the Merchant Bank’s Processor.
Step 3: National Merchants Association submits the transaction to
the Credit Card Network.
Step 4: The Credit Card Network routes the transaction to the
Customer’s Credit Card Issuing Bank.
Step 5: The Customer’s Credit Card Issuing Bank approves or
declines the transaction based on the customer’s available funds
and passes the transaction results back to the Credit Card Network.
Step 6: The Credit Card Network relays the transaction results to
National Merchants Association
Step 7: National Merchants Association relays the transaction
results through NMAPAY(website)
Step 8: NMAPAY stores the transaction results and sends them to
the customer and/or the merchant. This step completes the
authorization process - all in about three seconds or less!
Step 9: National Merchants Association sends the appropriate funds
for the transaction to the Credit Card Network, which passes the
funds to the Merchant’s Bank. The bank then deposits the funds into
the merchant’s bank account. This step is known as the settlement
process and typically the transaction funds are deposited into your
primary bank account within 24 to 48 hours.
17) Write a note on WIPO.

www.gkmvkalyan.blogspot.com Page 227


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 228 of 240

World Intellectual Property Organisation – WIPO, is a global forum


for intellectual property services, policy, information and co –
operation. Copy right has been the focus of protecting intellectual
property on the internet.

18) What is FSF?


FSF is Free Software Foundation. FSF is a non-profit organization
created for the purpose of supporting free software movement.
Richard Stallman founded FSF in 1985 to support GNU project and
GNU licenses. FSF has founded many software developers to write
free software. Now a day, it also works on legal and structural
issues for the free software community.

19) List the OSS and Floss.


OSS refers to Open Source Software, which refers to software
whose source code is available to customers and it can be modified
and redistributed without any limitations.
List of OSS
Apache HTTP Server rhttp://httpd.apache.org/l (webserver)
Blender rhttp://www.blerider.orgl (3D graphics and animation
package)

FLOSS refers to Free Libre and Open Source Software or to Free


Livre and Open Source Software. The term FLOSS is used to refer to
software which is both free software as well as open source
software.
List of FLOSS
Mozilla Suite
OpenOffice.org

www.gkmvkalyan.blogspot.com Page 228


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 229 of 240

20) What is domain name? List some common domain.


Domain Name:
A domain name refers to your website address. This is what users
type in a browser's search bar to directly access your website.
A domain name is unique and cannot be shared between different
sites. such as 'google.com', and 'facebook.com'. Users can connect
to websites using
.com – commercial business.
.org – organizations.
.gov – government agencies.
.edu – educational institutions.
.net – network organizations.
.mil – military.

www.gkmvkalyan.blogspot.com Page 229


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 230 of 240

CHAPTER-17 Web Designing


One Mark MCQ’s Question and Answer.
(See in MCQ’s Section)

1) What is HTML?
HTML is known has Hypertext Markup Language, which is used to
create websites.

2) Mention the use of HTML.


HTML is used to create websites.

3) What will be the extension of hypertext markup language file?

*.html
4) Write any one HTML tag
<HTML> Marks the beginning of HTML.

5) What is DHTML?
Dynamic Hypertext Markup Language.

6) Expand XML.
eXtended Markup Language

7) What is web scripting?


The process of creating and embedding scripts in a web page is
known as Web-Scripting.

8) What is the use of HTML


HTML is used to create websites.

9) Write any one formatting HTML tag.


HTML uses tags like <b> and <i> for formatting output like bold or
italic text.

www.gkmvkalyan.blogspot.com Page 230


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 231 of 240

10) What is free hosting?


This type of hosting is available with many prominent sites that
offer to host some web pages for free of cost.

11) What is web hosting?


Web Hosting is a means of hosting web-server application on a
computer system through which electronic content on the internet is
readily available to any web-browser client.

12) What do you mean by domain?


Domain name are used to identify one or more ip addresses.
Domain names are used in URLs to identify particular web page/web
pages.

13) What is web page?


The documents residing on web sites are called Web Pages. The
web pages use HTTP (Hypertext Transfer Protocol).

Three Mark Questions and Answers.

1) Explain any three formatting tags in HTML.

www.gkmvkalyan.blogspot.com Page 231


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 232 of 240

2) Explain any three re-sizing text tags in HTML.

3) What is web hosting? Mention the different types of web


hosting.(OR)
What is web hosting? Mention various web hosting services.
Web Hosting means hosting web-server application on a computer
system through which electronic content on the Internet is readily
available to any web browser client
Various types of web hosting services are available.
a) Free Hosting- It is available with many prominent sites that
offer to host some web pages for no cost with limited services.
b) Virtual or Shared Hosting-It is provided under one’s own
domain name with a web hosting company.

www.gkmvkalyan.blogspot.com Page 232


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 233 of 240

c) Dedicated Hosting- This type of hosting, the company wishing


to go online rents an entire web server from a hosting company.
d) Co-location Hosting- similar to dedicated hosting, but the user
owns the server; the hosting company provides physical space
and take care of the server maintenance.

4) Explain HTML structure.


An HTML document has a definite structure that must be specified
to the browser. The HTML structure is described below.

5) What is Web Scripting? Explain its type.

www.gkmvkalyan.blogspot.com Page 233


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 234 of 240

The process of creating and embedding scripts in a web page is


known as web-scripting.
The most common scripting languages are VBScript, JavaScript,
ASP,
PHP, PERL, JSP etc.
Types of Scripts are:
i) Client-Side Scripts
ii) Server side scripts

1. Client-Side Scripts
Client-Side scripting enables interaction within a web page.
The client-side scripts are downloaded at the client-end and then
interpreted and executed by the browser. The client side scripting is
browser dependent. Client-side scripting is used when the client-
side interaction is used.
2. Server-side scripts
Server-side scripting enables the completion or carrying out a task
at the server end and then sending the result to the client end.
In server side script, the server does all the work, so it doesn't
matter which browser is being used at client end.
Some popular server side scripting languages are PHP (Hypertext
Pre Processor)

6) What are the uses of server side scripting?


Server-side scripting enables the completion of the task at the
server
end and then sending the result to the client end.
Uses of server side scripting (PHP) may be
a) Password protection
b) Browser customization
c) Form processing
d) Building and displaying pages created from a database.

www.gkmvkalyan.blogspot.com Page 234


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 235 of 240

e) Dynamically editing changing or adding content to a web


page.

7) Explain the types of servers in networks


The table below lists the most common types of servers that are
implemented on a network:
Type of servers Description
File server Stores network users' data files
Print server Manages the printers that are connected to the
network and the printing of user documents on the
network printers
Communications Handles many common communications functions
server for the network, such as e-mail, fax, remote
access, firewalls or Internet services
Application server Shares network-enabled versions of common
application software and eliminates the need for
software to be installed on each workstation
Database server Manages common databases for the network,
handling all data storage, database management
and requests for data
Domain server Authenticates and authorizes computers and users
to access resources within the logical domain

8) Explain the program to include tables in Web page.


The basic structure of an HTML table consists of the following tags:

Table tags <Table> </Table>


Table Row tags <TR> </TR>
Table Header tags <TH> </TH>
Table Data tags <TD> </TD>

www.gkmvkalyan.blogspot.com Page 235


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 236 of 240

Example:
<html>
<head>
<title>MY Time Table</title>
</head>
<body bgcolor="PINK">
<H1><center>Study Time Table</center></H1>
<table border="3" align="center">
<tr>
<th>Day/Time</th>
<th>7:00-8:00</th>
<th>8:00-8:30</th>
<th>8:30-9:30</th>
<th>9:30-10:30</th>
</tr>
<tr>
<td>MONDAY</td>
<td>Home Work</td>
<td>Dinner</td>
<td>Physics</td>
<td>Computer</td>
</tr>
</table></body></html>

9) What are steps used in creating Web Hosting?


The steps involved in hosting a webpage are:
a) Selecting type of web hosting services,
b) Installation of web applications,
c) Domain registration,
d) Developing web content, and
e) Uploading HTML files.

www.gkmvkalyan.blogspot.com Page 236


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 237 of 240

10) What is use of PHP files?


a) PHP can perform calculations - PHP can perform all types of
calculations. Can find out what day it is, or what day of the week, to
perform all different types of mathematical equations.
b) PHP can collect user information - collecting the temperature
from the user that they want to convert from degrees to another
format, or adding their information to an address book
c) PHP can interact with MySQL databases - This allows creating
pages on the fly using the contents of the database, creating a
website search feature, or keep the store’s product catalogue.
d) PHP and GD Library can create graphics - You can use PHP to
create simple graphics and also use it to edit existing graphics.

11) Give the features of XML?


Main features of XML:
a) XML files are text files, which can be managed by an arty text
editor.
b) XML is very simple because it has less than 10 syntax rules.
c) XML is extensible because it only specifies the structural rules
of tags. No specification on tags themselves.
d) XML provides a basic syntax that can be used to share
information between different kinds of computers, different
applications.
e) Its self-documenting format describes structure and field
names as well as specific values.
f) XML is heavily used as a format for document storage and
processing, both online and offline.
g) It is based on international standards.

12) Give the features of DHTML.


a) Simplest feature is making the page dynamic.
b) It can be used to create animations, games, applications, provide
new ways of navigating through web sites.
c) Uses low-bandwidth effect which enhances web page
functionality.
d) The dynamic building of web pages is simple using DHTML.
e) Allows code reuse.
f) Using DHTML we can change the tags and their properties.

www.gkmvkalyan.blogspot.com Page 237


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 238 of 240

g) It is used to generate dynamic fonts.

13) What are advantages of web designing?

The advantages of web designing are:

a) A website is a representation and the best performance of a


company.
b) As it is an interactive marketing tool, organisations all products can
be displayed and advertised all over the world.
c) It is possible for companies to communicate with customers
directly.
d) Companies can able to have an opportunity to beat other
competitors in the market.
e) It is possible to create awareness about services and products as it
is an online portal.
f) The website not only enhances a good relationship between
customers and business owners but also provides a chance to earn
a huge profit and increase sales.

14) What are the advantages and disadvantages of www? Or Give the
advantages of Internet.
Advantages of the WWW:
1. E-Mail: E-mail is an online correspondence system. With e-mail,
you can send and receive instant electronic messages. Your
messages are delivered instantly to people anywhere in the world.
2. Access Information: The Internet is a treasure of information.
Any kind of information on any topic is available on the Internet.
The ‘search engines’ on the Internet can help you to find data on
any subject that you need.
3. Shopping: One can also buy and sell goods online. There are
many online stores and sites that can be used to look for products
as well as buy them using a credit card.
4. Downloading Software: One can download a lot of games,
music, videos, movies from the Internet, most of which are free.
Disadvantages of the Internet:

www.gkmvkalyan.blogspot.com Page 238


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 239 of 240

1.Personal Information: If you use the Internet, your personal


information such as your name, address, etc. can be accessed by
other people. If you use a credit card to shop online, then your
credit card information can also be ‘stolen’.
2.Spamming: This refers to sending unsolicited e-mails in bulk,
which serve no purpose and unnecessarily fill up the entire system.
3.Virus Infections: Your computer can get virus infections. It is not
fully secure.
4.Socially Disconnect: People decrease the time they go out and
stays on the world wide web for too long.

Definition’s and Expansions


Hub
A hub is a hardware device used to connect several computers together.
ARPANET
The Advanced Research Projects Agency Network (ARPANET)
Router
A device that works like a bridge but can handle different protocols is
known as a router.
EXPAND
2G - second generations wireless telephone technology
1G – First generations wireless telephone technology
3G – Third generations wireless telephone technology
4G­ Fourth generation’s wireless telephone technology
HTTP- Hypertext Transfer Protocol
TCP/IP- Transmission control protocol/internet protocol
OSI-Open System Interconnection
FTP- File transfer protocol
GPRS –General packet radio service
OSS- Open Source Software
FLOSS – Free Libre and Open Source Software
URL-Uniform Resource Locator
IPR- Intellectual Property Rights
XML- Extensible markup language
HTML- hypertext markup language
FSF-Free Software Foundation
OSI-Open Source Initiative
W3C- World Wide Web Consortium

www.gkmvkalyan.blogspot.com Page 239


II PUC Computer Notes www.gkmvkalyan.blogspot.com Page 240 of 240

UDP – User Datagram Protocol


SIM - Subscriber Identification Module
Wi-Fi- Wireless Fidelity, which lets you connect to the internet without a
direct line from your PC to the ISP.
Chatting - Real-time communication between two users via computer.
Video conference - A video conference is a live, visual connection
between two or more people residing in separate locations for the purpose
of communication.
free-hosting - This type of hosting is available with many prominent
sites that offer to host some web pages for free of cost.
VGM-Voice Grade Medium.
DGM-Data Grade Medium.
WLL or WILL-Wireless in local loop.

www.gkmvkalyan.blogspot.com Page 240

You might also like