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

CS Computer Science Passing Notes

The document is a study material for II PUC Computer Science, prepared by Kabbur Publications, which includes one-mark and two-mark questions on various topics such as computer system configuration, motherboard components, types of buses, and power supply types. It provides definitions, explanations, and examples for key concepts in computer science. Additionally, it encourages subscriptions to the Kabbur Publications YouTube channel for more study resources.

Uploaded by

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

CS Computer Science Passing Notes

The document is a study material for II PUC Computer Science, prepared by Kabbur Publications, which includes one-mark and two-mark questions on various topics such as computer system configuration, motherboard components, types of buses, and power supply types. It provides definitions, explanations, and examples for key concepts in computer science. Additionally, it encourages subscriptions to the Kabbur Publications YouTube channel for more study resources.

Uploaded by

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

For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

Government Of Karnataka

Passing
Package

II PUC
Computer Science

2021-22
KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960
For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL


INSTITUTIONS SOCIETY,BENGALURU

II PUC
COMPUTER SCIENCE(41)
PASSING PACKAGE

Prepared By:

Computer Science Resource Team

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 1:

TYPICAL CONFIGURATION OF COMPUTER SYSTEM


I. ONE MARK QUESTIONS:
1. Expand UPS.
Ans. Uninterruptible Power Supply
2. Expand SIMM.
Ans. Single In-line Memory Module
3. Expand DIMM.
Ans. Dual-In-Line Memory Module
4. Expand SMPS.
Ans. Switched Mode Power Supply
5. Expand USB.
Ans. Universal Serial Bus
6. Expand DDRAM.
Ans. Double Data Rate Random Access Memory
7. Expand PCI.
Ans. Peripheral Component Interconnect
8. Expand ISA.
Ans. Industry Standard Architecture
9. Expand SDRAM.
Ans. Synchronous Dynamic Random-Access Memory
10. What is motherboard?
Ans. It is a hub which is used to connect all the necessary components of the computer. OR The motherboard is a
large printed circuit board which contains all major parts. It is the main circuit board of computer system
11. What is Microprocessor?
Ans. Microprocessor or CPU is a complete computation engine that is fabricated on a single chip.
12. What is a port?
Ans. It is the socket on the back of the computer which is used to connect external devices to the motherboard. ( OR
)A place to connect the input/output and peripheral devices to computer system
13. What is a bus?
Ans. Bus is a set of electrical conducting lines through which binary information is transferred. ( OR ) A Bus is a
communication system that transfers data between components inside a computer
14. What is Cache Memory?
Ans. It is a small, very fast memory that exists between the RAM and the CPU.
15. Where is L1 and L2 located?
Ans. L1 resides with in CPU (it is also called On-Chip cache) L2 resides on Motherboard (it is also called Off-Chip
cache)
16. What is SMPS?
Ans. SMPS is a voltage regulator which converts AC Power to DC Power and supplies power needed by system
components.
17. What is meant by Plug and play Device?
Ans. Plug-Play device means devices can be inserted or removed into/from the computer system without turning
the computer OFF or without adding an adapter card.
18. What is Register?
Ans. Registers are high speed storage units within the CPU, but have least storage capacity.
19. Expand BIOS.
Ans: Basic Input Output System
II. TWO MARKS QUESTIONS
1. Explain any 2 characteristics of motherboard.
 Form Factor: It includes motherboard’s electrical requirement, geometry, dimension and arrangement.
 Chipset : It is a collection of microchips (such as CPU,BIOS, memory, mass storage, interfaces,
controllers and I/O devices)designed with built-in circuits on motherboard to work together to perform
specific functions.
II PUC COMPUTER SCIENCE (41) Page 1

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

 Processor Socket : It includes the type of CPU socket used to insert the CPU. It is designed as per the
compatibility of the CPU on the motherboard. Example: PGA socket, LGA socket.
2. Explain any 2 types of motherboard.
 XT Motherboard: XT stand for eXtend Technology. These are old model motherboard. In this
motherboard, we find old model processor socket LIF(Low Insertion Force) sockets, DIMM ram slots and
ISA slots, 12pin power connector and no ports.
 AT Motherboard: AT Stand for Advanced Technology Motherboards. They have PGA(Pin Grid Array)
Socket, SDRAM slots, 20 pin power connector, PCI slots and ISA slots. Example: Pentium III Processors
 Baby AT Motherboard: Baby AT Motherboards have the combination of XT and AT. They have slot
type processor sockets and PGA processor sockets, SDRAM slots and DDRRAM slots, PCI slots and ISA
slots, 12 pin power connector and 20 pin power connector and ports. Example: Pentium-III and Pentium-
IV
 ATX Motherboard: ATX stand for Advanced Technology eXtended. Latest motherboard is called as
ATX motherboard. In this motherboard, we find MPGA processor sockets, DDRRAM slots, PCI slots,
AGP slots, SATA connectors, 20 pin and 24 pin ATX POWER CONNECTOR AND PORTS.
Example: Pentium-IV, Dual Core, Core 2 Duo, Quad Core,i3,i5, and i7 processors.
3. Explain any 2 different types of buses.
 Address Bus – It carries address of the data in the memory which is to be read from/write into. Width of
the address bus determines the number of memory locations the computer can address.Example:36-bit
address bus can address 236=64GB of memory location
 Data Bus - Provides a path to transfer data and instruction between CPU and memory. Width of data bus is
32-bit, 64-bit etc.
 Control Bus-It carries control signals sent from CPU to different parts of the computer. It also used to
direct and monitor the actions of the other functional parts of the computer system.
4. Explain the different types of I/O ports (Any 2).
 These ports are also called as communication ports.
 The I/O ports connects the external devices to the motherboard.
 Serial Port: Serial Port is also known as communication (COM) ports or RS232c ports. They are used for
connecting communication devices like mouse and modem. This port transfers data serially one bit at a
time. There are two varieties of COM ports, the 9-pin ports and 25- pin Ports.
 Parallel port: Parallel ports are used to connect external I/O devices like printers or scanners. This port
facilitates the parallel transfer of data, usually one byte(8-bits) at a time.
 USB –port: It is an advanced I/O port. Gives a single, standardized, easy-to-use way to connect a variety
of newer peripherals to a computer
 IDE (Integrated Digital Electronics) port: IDE devices like CD-ROM drives or hard disk drives are
connected to the motherboard through the IDE port.
 AGP (Accelerates Graphics Port) port: The AGP port is used to connect graphic card that provides
high-speed video performance, typically required in games and others multimedia applications.
5. Explain the function of UPS and its types.
 An UPS is a power supply device that includes a battery to maintain power in the event of a power failure.
 Typically, an UPS keeps a computer running for several minutes to few hours after a power failure.
 Types of UPS
1. Online UPS: An online UPS avoids those momentary power lapses by continuously providing
power from its own inverter, even when the power line is functioning properly. Online UPS is
more costly than Standby UPS.
2. Standby UPS: A Standby UPS (or OFF-LINEUPS) Monitors the power line and switches to
battery power as soon as it detects a problem. The switch over to battery, however, can require
several milliseconds, during this time the computer is not receiving any power.
6. Explain 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.
 Cache memory temporarily stores data that is used more often and makes it available to CPU at a fast rate.
 Hence it is used to increase the speed of processing.
7. Explain any 2 components of the Motherboard.

II PUC COMPUTER SCIENCE (41) Page 2

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

1. Processor (CPU): The processor or CPU is the main component on the motherboard and is called as the
brain of the computer. It consists of ALU, CU registers.
2. BIOS Chip (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. The BIOS runs when the computer is switched ON. It performs a Power On Self-Test (POST),
that checks the presence of hardware devices and are functioning properly.
8. What is expansion slot? Mention any TWO types.
 It is an opening on the motherboard into which expansion boards (peripheral cards) are inserted to improve
the functionality or capability of the computer. Example: After installing a sound card on the expansion
slot, sound capability of the computer can be improved or added. TYPES: ISA, PCI, AGP slot
 ISA (Industry Standard Architecture) Slot- ISA slot is used to connect modem and input devices.
 PCI (Peripheral Component Inter Connect) Slot- PCI slot is used to connect graphics accelerator cards,
sound cards, internal modem or SCSI cards, they are mush faster than ISA cards.
 AGP (Advanced Graphic Port) Slot- It is used to connect graphics accelerator cards and 3D accelerator
cards. It enhances the visual experience for the user in multimedia applications and games.
III. FIVE MARKS QUESTIONS
1. What is port? Explain any four types of port.
Port is a connector or place used to connect input / output or peripheral devices to computer system
Types of port
 Serial port- - It transmits 1 bit at a time, It needs single communicating wire to interface with the
computer
 Parallel port- It transmits 8 bit at a time, It needs 8 communicating wire to interface with the
computer
 USB – PORT-Universal serial bus port.
 AGP Port Accelerated graphics port -Used to connect graphics card that provides high speed video
performance specially required in games and other multimedia application.
 VGA PORT- Visual graphics adaptor port. -Used to connect monitor to computer’s video card.
2.What is bus? Explain different types of bus.
 In computer architecture, bus is a communication path that transfers data and instructions between the
components inside a computer.
 Types based on location
1. Internal: It connects different components on motherboard like processor, RAM etc. It is also called system
bus.
2. External: It serves as an interface for peripheral devices like HDD, CD-ROM etc. to connect with
processor. It is also called as expansion bus.
 Types based on functionality
1. Control BUS: It is used by the processor to send control signals to different components and to maintain
co-ordination with TCU.
2. Data BUS: It provides the path to transfer data and instructions between CPU and memory.
3. Address BUS: It provides the transfer of physical address of the data and instructions in the main memory.
3. Define a)Bus b)Port c)Microprocessor d)Cache memory e)Disk controller
 A Bus is a collection of wires that carries electrical signals from one component to another
 Port is a socket used to connect external devices to the computer
 Microprocessor is a single integrated circuit chip that function as computer CPU
 Cache memory is a small, fast intermediate memory present in between CPU and RAM
 Disk controller-is a circuit that enables the CPU to communicate with hard disk/floppy disk drives
4.Explain the types of power supply.
There are two types of power supply connected to a computer system . They are :
1. SMPS [ Switch Mode Power Supply ]
2. UPS [ Uninterruptable Power Supply ]
1. SMPS :

II PUC COMPUTER SCIENCE (41) Page 3

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

 SMPS converts AC power from an electrical outlet to the DC power needed by system components.
SMPS is a metal box in the rear of the system that is attached to the computer chasis and to the system
board.
 In a PC the SMPS converts 230 volts of AC to 5 to 12 volts of DC and the wattage is around 180 to 300
watts, 450 watts and 500 watts.
2. UPS :
 An 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.
 UPS keeps a computer running for several minutes to few hours after a power failure, enabling us to save
data that is in RAM and then shut down the computer properly.
 There are two types of UPS :
1. Offline UPS or Standby UPS:
In offline UPS the input current is directly connected to the device.
The UPS circuit always monitors the voltage level in the mains, and if there is a voltage drop or
mains failure, it switches on the inverter to give AC power to the device from the inverter until the
mains supply returns to normal.
2. Online UPS :
In online UPS the inverter is directly connected to the device and it is always on to give the
required current to the device.
Online UPS avoids momentary power lapses by continuously providing power from its own
inverter , even when the power

5. With a neat block diagram of a computer explain the basic units of computer.
A computer is designed using four basic units. They are:
1. Input Unit
2. Central Processing Unit(CPU)
 Control Unit
 Arithmetic and Logic Unit (ALU)
3. Memory Unit
4. Output Unit

Input Unit:
 Computers need to receive data and instructions in order to solve a problem. The Input unit performs this
operation.
 The Input Unit basically links the external world or environment to the computer system.
 The input unit may consist of one or more input devices.
Central Processing Unit (CPU):

 The function of the CPU is to interpret the instructions in the program and execute them one by one. It
consists of two major units.
1. Control Unit: It controls and directs the transfer of program instructions and data between various units.
2. Arithmetic and Logic Unit (ALU): Arithmetic and Logic Unit performs arithmetic and logical operations
and controls the speed of these operations
Memory Unit:

 The results generated from processing have to be preserved before it is displayed.


 The memory units thus provide space to store input data, intermediate results and the final output
generated.
 Note: The input unit, an output unit, and secondary storage devices are together known as Peripheral
Devices.
Output Unit:
 It is used to print or display the results, which are stored in the memory unit. The actual function of the
output unit is just the reverse of the input unit.
 Thus, the output unit links the computer to the outside world.

II PUC COMPUTER SCIENCE (41) Page 4

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER-2
BOOLEAN ALGEBRA
I. TWO MARKS QUESTIONS:
1. Prove that (X+Y)(X+Z) = X+YZ using algebraic
method.Proof:LHS = (X+Y)(X+Z)
= XX + XZ +XY + YZ
= X+XZ+XY+YZ (⸪X.X=X)
=X +XY+YZ (⸪X+XZ=X)
= X + YZ (⸪X+XY=X)
= RHS

2. Prove that ( + )( + ) = using algebraic meth-


od. Proof: LHS=( + )( + )
= + + +
= + + +0 (⸪ = , = 0)
= + (⸪ + = )
= (1 + )
= .1
= =
3. Prove that X+ Y=X+Y using algebraic method.
Proof: LHS=X+ Y (Let X=X+XY)
=X+XY+ Y
=X+Y(X+ )
=X+Y (1)
=X+Y
=R.H.S

4. Prove that X+XY=X using algebraic method.


Proof: LHS = X+XY
= X(1+Y) =X.1 (⸪1 +Y=1)
=X (⸪X.1 =X)
= RHS
5. Prove that X(X+Y)=X using algebraic method.
Proof: LHS = X(X+Y)
= X.X + XY
= X+XY (⸪X.X=1)
= X(l+Y)
= X.1 (⸪l+Y=1)
=X (⸪X.1=X)
= RHS
6. Define min term and max term.
Ans: Minterm is a product of all the literals (with or without bar) within the logic system. Maxterm
is sum of all the literals (with or without bar) within the logic system.

II PUC COMPUTER SCIENCE (41) Page 5

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

7.What is meant by tautology and fallacy?


Ans: If result of any logical expression is always TRUE or 1 , then it is called
Tautology. If result of any logical expression is always FALSE or 0,then it is
called Fallacy.
8. What is principle of duality? Give an example.
Ans: This theorem states that, starting with a Boolean relation another Boolean
relation cabe derived by
i. Changing each OR sign (+) to an AND sign (.) and by Changing each AND
sign (.) toan OR sign(+)
ii. Changing each 0 by 1 and each 1 by 0.
Example: Dual of 1+0=1 is 0.1=0
9. State and prove idempotence Law.
Ans: This law states that
a) X+X=X b) X.X=X

X X X+X X X X.X
0 0 0 0 0 0
1 1 1 1 1 1
10. State and prove Involution law.
X
Ans: This law states that X=X
0 1 0
1 0 1

11. State and prove Complementary Law.


Ans: This law states that
a)X + = 1 b) X. =0
X + X X.
0 1 1 0 1 0
1 0 1 1 0 0

12. State and prove commutative law using truth table X. Y= Y.X
X Y X.Y Y.X
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1

X+Y=Y+X
X Y X+Y Y+X
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 1

II KABBUR PUBLICATIONS
PUC COMPUTER SCIENCE (41) YouTube Channel, Contact 9738237960
Page 6
For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

13.Prove that XY+XY =X


Algebraic method=XY+XY
=X(Y+Y ) (by complementarity law)
=X.1 (property of X.1=X)
=X
Or Truth table
X Y Y XY XY XY+XY
0 0 1 0 0 0
0 1 0 0 0 0
1 0 1 0 1 1
1 1 0 1 0 1

14.Find the complement of the expression F=Y+XZ+XY


F=Y+XZ+XY
=(Y+XZ+XY)
=Y .(X + Z ) . (X + Y )

15.State De Morgan’s theorems.


Ans: It states that
) + = .
The inverted sum of two variables is equal to the product of their individual
inverted variables.

b) . = +
The inverted product of two variables is equal to the sum of their individual
invertedvariables.

II.FIVE MARKS QUESTIONS:


1. Simplify the Boolean function ( , , , ) = ∑( , , , , , , , , )
using K-map
Ans.

Thus, the combined reduced sop expression is, = + +

II KABBUR PUBLICATIONS
PUC COMPUTER SCIENCE (41) YouTube Channel, Contact 9738237960
Page 7
For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

2. Using k-map, simplify the following exp in 4 variables ( , , , ) = + +


+ + + + +

∴ Combined reduced sop expression is = + + + ABCD


3. Reduce ( , , , ) = ∑( , , , , , , , ) using in K-Map.

∴ Combined reduced sop expression is = + + +

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

∴ Reduced sop expression is = C D + B C


5. Simplify the following Boolean expression using K-Map F (A, B, C, D) =∑ (0, 2, 5, 7, 8, 10,
13, 15)

∴ Combined reduced sop expression is = B D + B D

II KABBUR PUBLICATIONS
PUC COMPUTER SCIENCE (41) YouTube Channel, Contact 9738237960
Page 8
For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

7. Simplify the following Boolean expression using K-Map F (A, B, C, D) =∑ (0, 2,4, 5,6, 7, 8,
10,12,13,14,15)

∴ Combined reduced sop expression is = D + B D


8. Simplify the following Boolean expression using K-Map F (A, B, C, D) =∑ (1, 2, 3, 5, 7, 8, 9,
11,13, 15)

∴ Combined reduced sop expression D+ABC+ABC

II KABBUR PUBLICATIONS
PUC COMPUTER SCIENCE (41) YouTube Channel, Contact 9738237960
Page 9
For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 3:
LOGIC GATES
I. ONE MARKS QUESTIONS:
1. Write the Logic symbols and Truth Tables for AND,OR,NOT, NAND ,NOR and XOR gates.
Ans:

2. What is universal gate.


Ans: Universal gate is a gate using which all the basic gates can be designed.
3.Write the symbol and Truth Table for XNOR.
Ans:

4.What is logic gate?


Ans: A Gate is a simply an electronic circuit which operates on one or more input signals and
always produces an output signal.
5.Mention the different universal gates.
Ans: NAND gate and NOR gate
6. NOT gate is also called as
Ans: Not gate is also called as Inverter

II KABBUR PUBLICATIONS
PUC COMPUTER SCIENCE (41) YouTube Channel, Contact 9738237960
Page 10
For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel

KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

II. FIVE MARKS QUESTIONS:


1.Realize NOT,AND and OR gate using NAND Gate

2.Realize NOT,AND and OR gate using NOR Gate

3. Explain NAND and NOR gate with Logic symbol and Truth Table.
 NAND gate has two or more input signal but only one output signal.
 The NAND gate is a complemented of AND gate.
 The output of NAND gate will be 0 only when all inputs are 1 and output will be 0 if any input
represents a 0.
 NAND is short form of NOT-AND.

II KABBUR PUBLICATIONS
PUC COMPUTER SCIENCE (41) YouTube Channel, Contact 9738237960
Page 11
For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
 NOR gate has two or more input signal but only one output signal.
 The NOR gate is a complemented of OR gate.
 The output of NOR gate will be 1 only when all inputs are 0 and output will be 0 if any input repre-
sents a 1.
 NOR is short form of NOT-OR.

4.Explain XOR and XNOR gates with Logic symbol and Truth Table.
 An exclusive-OR has two or more input signal but only one output signal.
 Exclusive-OR gate is different form of OR gate.
 Exclusive-OR gate produces output 1 for only when the input combinations are different.
 The output is 0 if the input combinations are same.

XNOR gate
The XNOR gate is complement of XOR gate.
 The output of XNOR is 1 only when the logic values of both X and Y is same i.e. either both are equal to 1 or both
are 0.
 Its output is 0 when its inputs are different.
 In Boolean algebra, ʘ sign stands for XNOR operation. Thus A XNOR B can be
 written as A ʘ B

II PUC COMPUTER SCIENCE (41) Page 12

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 4
DATA STRUCTURES
I. ONE MARK QUESTIONS:
1. What is Data structure?
Data Structure is the way of collecting and organizing the data in such a way that we can perform operation
on these data in an effective way.
2. What are primitive data structures?
Data structures that are directly operated upon the machine-level instructions are known as primitive data
structures.
3. Give any two examples for primitive data structures.
The integers, float, character data, pointers are primitive data structures.
4. What are non-primitive data structures?
The Data structures that are derived from the primitive data structures are called Non-primitive data struc-
ture.
5. Mention any two examples for non- primitive data structures?
Array, stack, queues, linked list, tree and graph are non- primitive data structures
6. What are lists?
Lists are linear collection of data items.
7. What is meant by linear data structures?
Linear Data structures are kind of data structure that has homogeneous elements.
8. What are non-linear data structures?
A Non-Linear Data structures is a data structure in which data item is connected to several other data items.
9. Define an array.
An array is an ordered collection of elements of same data type that share common name
10. Differentiate between one-dimensional and two-dimensional array.
In one-dimensional array we use only one subscript to identify an element where as in two dimensional ar-
rays we use two subscripts.
11. What do you mean by traversal operation?
The processing of accessing each element exactly once to perform some operation is called traversing.
12. Define searching.
The process of finding the location of a data element in the given collection of data elements is called as
searching.
13. Mention the types of searching in the array.
Linear Search and Binary Search.
14. Define sorting.
The process of arrangement of data elements in ascending or descending order is called sorting.
15. What is a stack?
A stack is an ordered collection of items in which an element may be inserted or deleted only at same end.
16. Name the data structure which is called LIFO.
A LIFO (Last In First Out) data structure is also called as stack.
17. What is LIFO list?
A stack data structure which follows LIFO (Last In First Out) list principle.
18. What are the operations that can be performed on stacks?
Stack( ), push(item), pop( ), peek( ), isEmpty( ), size( ) are the operations of stack.
19. Define the term PUSH and POP operation in stack.
 The process of adding one element or item to the stack is represented by an operation called as the
PUSH operation.
 The process of deleting one element or item from the stack is represented by an operation called as
the POP operation.
II PUC COMPUTER SCIENCE (41) Page 13

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
20. Mention any one application of stacks.
 It is used to reverse a word.
 “Undo” mechanism in text editor.
 Polish Notation
21. What is a queue?
A queue is an ordered collection of items where an item is inserted at one end called the “rear” and an
existing item is removed at the other end, called the “front”.
22. What is the other name of queue?
Other name of queue is FIFO.
23. What is FIFO list?
In a FIFO list, the first element added to the list will be the first one to be removed.
24. Mention the different types of queues.
Different types of queues are Linear queue, Circular queue, Double ended queue, Priority queue.
25. What are the operations that can be performed on queue?
Queue( ), enqueue(item), dequeue( ), isEmpty( ), size( ).
26. What is a linked list?
A linked list is a linear collection of data elements called nodes.
27. Which data structure creates relationship between data elements through links?
Linked List creates relationship between data elements through links.
28. What is binary tree?
A binary tree is an ordered tree in which each internal node can have maximum of two child nodes connected
to it.
29. What do you mean by depth of a tree?
The height or depth of a tree is defined to be the maximum number of nodes in a branch of tree.
30. How do you find the degree of tree?
The degree of tree is the maximum degree of nodes in the tree. The degree of node is the maximum number
of children that can exist for a node.

II. THREE MARK QUESTIONS:


1. Explain memory representation of two-dimensional array.
Let A be a two-dimensional array having M rows and N columns. The array elements will be represented in the
memory by a block of M*N sequential memory locations. The array elements may be stored in the memory in any one
of the following methods:
1) Row- major representation:
In this representation, the first-row elements of the array occupy the first set of memory locations, second row elements
occupy the next set of memory locations. To find the memory address of an element in the Ith row and Jthcolumn of
the matrix of order M*N is :
LOC(A[I][J]) = Base(A) + W( N * I + J ) Where Base(A) is address of first element and W is word size in bytes
2) Column-major representation:
In this representation, the first- column elements of the array occupy the first set of memory locations, second column
elements occupy the next set of memory locations. To find the memory address of an element in the ith row and
Jthcolumn of the matrix of order M*N is :
LOC(A[I][J]) = Base(A) + W( M * J + I ) Where Base(A) is address of first element and W is word size in bytes
2. Write an algorithm for traversing the array.
Step 1 : For I = LB to UB Do
Step 2 : Apply PROCESS to A[I]
[End of for loop]
Step 3 : Exit

II PUC COMPUTER SCIENCE (41) Page 14

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
3. Mention the different types of queue.
The different types of queue are:
 Simple queue (Linear queue)
 Double Ended Queue (DEQUEUE)
 Circular queue
 Priority queue
4. Different operations on stack
Different operations on stack are:
 push(item) : Adds a new item to the top of the stack and increases the size of the stack by one ( top = top + 1 ).
 pop() : Removes the top item from the stack and decreases the size of the stack by one ( top = top – 1 ).
 peek() : Returns the top item from the stack but does not remove it.
 isempty() : Test whether the stack is empty.
 size() : Returns the number of items present in the stack.
 overflow() :Tests whether the stack is full.
 underflow () :Tests whether the stack is empty.
 stack() : Ceates a new stack that is empty.

5. Different operations on queue


Different operations on queue are:
1. queue() : Creates a new queue that is empty.
2. enqueue(item) : Adds a new item to the rear of the queue and increases the size of the queue by one
3. ( rear = rear + 1 ).
4. dequeue() : Removes the front item from the queue( front = front + 1 ).
5. isempty() :Tests to see whether the queue is empty.
6. size() :Returns the number of items present in the queue.
6. Write an algorithm for inserting an element into the array.
Step 1 : for I =N-1 downto P
A[I+1] = A[I]
[End of for loop]
Step 2 : A[p] = ITEM
Step 3 : N = N + 1
Step 4 : Exit

7.Write an algorithm for deleting an element from the array.

Step 1 : Item = A[P]


Step 2 : for I =P downto N-2
A[I] = A[I+1]
[End of for loop]
Step 3 : N = N-1
Step 4 : Exit

8. Mention different types of linked list.


The different type of linked lists are:
1. Singly linked list
2. Doubly linked list
3. Circular linked list
Five-mark questions:

II PUC COMPUTER SCIENCE (41) Page 15

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
9. Write an algorithm for binary search.
Step 1: LOC = -1
Step 2: HIGH = N-1
Step 3: LOW = 0
Step 4: While(LOW <= HIGH)
Step 5: MID = (LOW + HIGH)/2
Step 6: If (ELE = A[MID]) then
Step 7: LOC = MID
Goto Step 11
Step 8: If(ele<A[MID]) then
Step 9: HIGH = MID - 1
else
Step 10: LOW = MID + 1
[End if]
[ End of While]
Step 11: If(LOC >= 0)
Step 12: Print ele Found in Location LOC
Step 13: else
Step 14: Print ele not Found
[End if]
Step 15: Exit

10. Write an algorithm for insertion sorting.


Step 1: For I = 1 to N-1
Step 2: J = I
Step 3: while(J>= 1)
Step 4: if (A[J] < A[J-1]) then
Step 5: temp= A[J]
Step 6: A[J] = A[J-1]
Step 7: A[J-1] = temp
[End If]
Step 8: J = J-1
[ End of while loop]
[ End of for loop]

11. Write an algorithm for Push


Step 1: [Check for Overflow]
If TOP = N-1 Then
Print “Stack is full or overflow”
Exit
[End if]
Step 2: TOP = TOP + 1
Step 3: STACK [TOP] = ITEM
Step 4: Return

12. Write an algorithm for pop.


Step 1: [Check for Underflow]
If TOP = -1 Then
Print “Stack is empty or Underflow”
Exit
[End If]
Step 2: ITEM = STACK [TOP]
Step 3: TOP = TOP -1
Step 4: return (ITEM)

II PUC COMPUTER SCIENCE (41) Page 16

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
13. Write an algorithm for Enqueue(Insertion in a queue).
Step 1: [check for overflow]
If REAR = N - 1 then
Print “Queue is full or overflow”
Exit
[End if]
Step 2: If FRONT = -1 then
FRONT = 0
REAR = 0
Else
REAR = REAR + 1
[End if]
Step 3: Q[REAR] = ITEM
Step 4: Return

14. Write an algorithm for Dequeue(Deletion in a queue).


Step 1: [check for Underflow]
If FRONT = - 1 then
Print “Queue is empty or underflow”
Exit
[End if]
Step 2: ITEM = Q[FRONT]
STEP 3: If FRONT = REAR then
FRONT = -1
REAR = -1
Else
FRONT = FRONT + 1
[End if]
Step 4: Return (ITEM)

15. Mention the applications of stack.


1. Polish notation
2. Recursion
3. Evaluation of Postfix Expression
4. Checking for balanced brackets or parentheses matching
5. Reversing a string

16. Mention the applications of queue.


1. Simulation.
2. Various features of operating system.
3. Multi-programming platform systems.
4. Different type of scheduling algorithm.
5. Round robin technique or algorithm.

III. FIVE MARK QUESTIONS:


1.What is non-primitive data structure? Explain the different operations performed on non-primitive data
structure.
Non Primitive data structures:-
 The Data structures that are derived from the primitive data structures are called Non-primitive data structure.
 They stress on formation of groups of homogeneous and heterogeneous data elements. These data structures
are used to store group of values,
 Eg- arrays, lists and files
Operations of non-primitive data structure-

II PUC COMPUTER SCIENCE (41) Page 17

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
1. Traversal: It is the process of visiting each element in the data structure exactly at once to perform certain
operation it.
2. Insertion: It is the process of adding a new element to the structure.
3. Deletion: It is the process of removing on item from the structure.
4. Searching: It is the process of finding the location of a data item in the given collection of data items is
called as searching.
5. Sorting: It is the process of arranging the data items in particular order.
6. Merging: It is the process of combining the data items of two structures to form a single structure.

2.Write an algorithm for insertion sort.


Algorithm: Let A be an array with N unsorted elements. The following algorithm sorts the elements in order.
Step 1: for I=1 to N-1
Step 2: J=I
While (J>=1)
If(A[J] < A[J-1])
Temp=A[J]
A[J] = A[J-1]
A[J-1] = temp
If end
J=J-1
While end
For end
Step 3: Exit

3.What do you mean by deletion? Write an algorithm for deleting an element from an array.
STEP 1: ELE = M[P]
STEP 2: FOR I = P TO N-1
STEP 3: M[I] = M[I+1]
[END OF STEP 3 FOR LOOP]
STEP 4: N= N – 1
[END IF]

4.Write an algorithm to perform the Binary search operation.


Step 1: set B = 0, E = n-1 LOC=-1
Step 2: while (B <= E)
M= int(B+E)/2
if(ELE = A[M]
loc = M
GOTO 4
else
if(ELE <A[M])
E = M-1
else
B = M+1
End of while
Step 3: if(LOC >= 0)
PRINT “LOC”
else
PRINT “Search is unsuccessful”
Step 4: Exit
5. Write an algorithm to insert an element at the beginning of the linked list.
Step 1: start
Step 2: P=new node
Step3: INFO[P]=ELE
Step 4: LINK[P]=FIRST
Step 5: FIRST=P
Step 6: stop
II PUC COMPUTER SCIENCE (41) Page 18

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

6.Write an algorithm to insert an element into a queue.


Step 1: If REAR = N-1 Then
PRINT “Overflow”
Exit
Step 2: If FRONT = NULL Then
FRONT = 0
REAR = 0
Else
REAR = REAR + 1
Step 3: QUEUE[REAR] = ITEM
Step 4: Return

7.What is Primitive data structure? Explain different operations on Primitive data structures.
The data structures which are directly operated on machine level instructions.
Ex :int, float, pointers etc…
Operations performed on primitive data structures are
1) create (2) destroy (3) select (4) update
 create : This operation is used to create new data structure. Ex: int x;
 destroy : This operation is used to remove unwanted data structures. Ex: Using delete operator/ destructor
function
 select : This operation is used to extract required data from data structure Ex: cout<<x;
 update : This operation is used to modify the contents of a data structure. Ex: x=x+2;

8. Write an algorithm to delete an element from a queue


(Queue is a linear data structure .It is an ordered collection of elements where insertion of an element takes place at
REAR end and deletion takes place at FRONT end) ITEM is the element deleted from FRONT position of the queue
Step 1 : if (FRONT = NULL)
Step 2 : print “Queue is empty”
Step 3 : exit()
End if
Step 4 : ITEM = Queue[FRONT]
Step 5 : if (FRONT = REAR)
Step 6 : FRONT = 0
Step 7 : REAR = 0
Else
Step 8 : FRONT = FRONT + 1
End if
Step 9 : Stop

9.Explain the different operations performed on the linked list.


1. Creating a linked list.
2. Traversing a linked list.
3. Inserting an item into a linked list.
4. Deleting an item from the linked list.
5. Searching an item in the linked list.
6. Merging two or more linked lists.

10.Define the following with respect to Binary Tree : a) Root node b) Leaf node c) Complete Tree
a) Root node :The very top node of a tree is called root node.
b) Leaf node : A node with no child nodes is called a leaf node.
c) Complete tree : Tree in which each leaf is at the same distance from the root.
i.e, all the nodes have maximum two sub trees.

II PUC COMPUTER SCIENCE (41) Page 19

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER-6:
OOP CONCEPTS
I.THREE MARKS QUESTIONS
1. Mention any three applications of OOP.
 Object oriented databases.
 CAD/CAM systems
 Computer graphics and applications Or any three applications
2.Write a note on Polymorphism
 Polymorphism is considered one of the important features of Object-Oriented Programming
 The word “poly” means many and “morphs” means forms, So it means many forms
 The ability of an operator and function to take multiple forms is known as Polymorphism
 The different types of polymorphism are operator overloading and function overloading

3) Write any four high-level languages that fallow object oriented programming approach
Ans : 1) C++ 2) C# 3) java 4) Python
4) Explain Inheritance.
 Inheritance is the process by which one object can acquire and use the properties of another object.
 The existing class is known as base class or super class.
 The new class is known as derived class or sub class.
 The derived class shares some of the properties of the base class. Therefore a code from a base class
can be reused by a derived class.

II. FIVE MARKS QUESTIONS


1. Mention and explain any five features or basic concepts of OOP.
 Class – Class is collection of data and functions.
 Object- Object is a real world entity with some characteristics and behavior.
 Inheritance- It is the capability of one class to inherit the properties from another class.
 Polymorphism- It is the ability for a message to be processed in more than one form.
 Function Overloading- Two are more functions have same name but differ in the arguments or data
types.
2)Explain the advantages of OOP’s
 Modularity based on class and object principle is followed.
 Code reusability to avoid code duplication.
 Encapsulation provides security of data from being used by non member function of class.
 Easier to develop complex software because inheritance helps to overcome code complexity.
 Object specification and implementation are separated by concept abstraction.
 Development time of software is reduced because creation and implementation is easy.
 OOP can communicate through message passing which makes description of interface outside the
system very easy

II PUC COMPUTER SCIENCE (41) Page 20

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
3)Explain the limitations or disadvantages of object oriented programming or Define object
oriented programming. Write the limitations of object oriented programming
 Object Oriented programming (OOP) is a programming paradigm that relies on the concept
of classes and objects.
 It is used to structure a software program into simple, reusable pieces of code blueprints (usually
called classes), which are used to create individual instances of objects.
 There are many object-oriented programming languages including JavaScript, C++, Java, and
Python.
1. OOP software is not having set standards.
2. The adaptability of flow diagrams and object oriented programming using classes and objects is a
complex process.
3. To convert a real world problem into an object oriented model is difficult.
4. The classes are overly generalized.
5. The size of programs developed with OOP is bigger than those developed with a procedural ap-
proach.
6. Since OOP programs are larger in size, the execution time for these programs is also more.
4)Mention any five application of OOP.
 Computer graphic application.
 Pattern recognition.
 CAD/CAM software.
 Web based application.
 Mobile computing.
 Data warehouse and data mining.
 Object – Oriented Database
 User interface design such a window.
 Real-time system
 Simulation and Modeling.
 Artificial intelligence and expert system.
5) Give the difference between procedural oriented programming and object oriented programming.
OOP POP
OOP is object-oriented programming POP procedure-oriented programming

The program is divided into objects The program is divided into functions.

Bottom-Up approach Top-down approach

Data in each object is controlled on its own Every function has different data, so there’s no control over it.

Inheritance is supported in three modes: public, private & protected Inheritance is not supported

Access control is done with access modifiers. No access modifiers supported.

Data can be hidden using Encapsulation No data hiding. Data is accessible globally

Overloading functions, constructors, and operators are done Overloading is not possible.

Classes or functions can be linked using the keyword “friend, only in C++. No friend function.

The existing code can be reused. No code reusability

Used for solving big problems. Not suitable for solving big problems.

C++, JAVA, VB.NET, C#.NET C, VB, FORTRAN, Pascal

II PUC COMPUTER SCIENCE (41) Page 21

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER -7:
CLASSES AND OBJECTS
I.TWO MARKS QUESTIONS
1) Write the differences between class definition and class declaration ?
Class declaration Class defination
Class declaration includes informing the Class definition is basically the actual
compiler about properties of the variable implementation and memory location of
such as its name, type of value it holds and function and about memory for the
the initial value if any it takes. variable is allocated during the definition
of the variable.
Memory has not been allocated during the Memory has been allocated during the
declaration of a variable or function, class definition of a variable or function or class
The declaration could be done multiple Variable or function could be defined only
times either of a variable or of function. once.
2) Explain the different types of access specifiers ?
Ans: Access specifiers define how the members (attributes and methods) of a class can be accessed.
Every data member of a class is specified by three levels of access protection for hiding data and function
members internal to the class. Access specifier define the scope of the data
Three types of access specifiers:
1. 1 private
2. 2 public
3. 3 protected

3) Give the syntax and example for class declaration


A class declaration specifies the representation of objects of the class and set of operations that can be
applied to such objects.
Syntax:
class class_name
{
private:
variables declaration;
public:
functions declaration;
};

Example:
class addition
{
private: int a, b, sum;
public:
void getdata( );
void display( );
};

II PUC COMPUTER SCIENCE (41) Page 22

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
II. FIVE MARKS QUESTIONS

1) What is class definition and declaration? Write its general syntax and example
 A class definition is a process of naming a class and the data variables ,and interface operation of the
class.
 The variables declared inside a class are known as data members.
 The functions declared inside a class are known as member functions.
 A class declaration specifies the representation of objects of the class and set of operations that can
be applied to such objects.
General syntax:
class user_defined_name
{
private:
Member_data;
Member_functions;
public:
Member_data;
Member_functions;
protected:
Member_data;
Member_functions;
};

Where,
Key word class is used to declare a class
User_Defined_Name is the name of the class.
Class body is enclosed in a pair of flower brackets. Class body contains the declaration of its members (data
and functions)
There are generally three types of members namely private, public and protected.
Example:
class Account
{
private:
int acc_no;
char name[25];
char acc_type[4];
int bal_amt;
public:
void getdata();
void display();
};

2) What are access specifiers? Explain any two with examples.


Access specifiers define the scope of data i.e., it controls the access of data and functions of a class.
There are three levels of access specifiers:
 private
 public
 protected.

II PUC COMPUTER SCIENCE (41) Page 23

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

Private:
 private access means a member data can only be accessed by the class member function
 The data members or member functions declared private cannot be accessed from outside the class.
 The objects of the class can access the private members only through the public member functions of
the class. This property is also called information hiding
 By default data members in a class are private.
Example: private:
int x; float y;
public:
public access means that member can be accessed any function inside or outside the class
Example: public:
int width;
void getdata( );
protected:
 The members which are declared using protected can be accessed only by the member functions,
friend of the class and also the member functions derived from this class.
 The members cannot be accessed from outside the class
 The protected access specifier is similar to private access specifiers.
Example: protected:
int x, y;

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
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 class_name(member function)

class rectangle
{
int length, breadth, area;
public:
void get_data( ) //function definition
{
cout<<” Enter the values for Length and Breadth”;
cin>>length>>breadth;
}
void compute( ) //function definition
{
area = length * breadth;
}
void display( ) //function definition
{
cout<<” The area of rectangle is”<<area;
}
};

II PUC COMPUTER SCIENCE (41) Page 24

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

4) What are the characteristics of member functions outside a class? Or Explain member function
outside the class definition with syntax and example
 A function declared as a member of a class is known as member function
 Member functions declared within a class must be defined separately outside the class To define
member function outside the class declaration, you must link the class name of the class with the
name of member function.
 We can do this by preceding the function name with the class name followed by two colons (::)
 The two colons (::) are called scope resolution operator.
 Scope resolution operator (::) is used to define the member function outside the class.
 The general form of a member function defined outside the class is:
return_type class_name : : member_function_name( arg1, arg2, ….argN)
{
function body;
}

Example:
class operation
{
private:
int a, b;
public:
int sum( );
int product( );
};
int operation : : sum( )
{
return (a+b);
}
int operation : : product( )
{
return (a * b);
}

5) Explain defining objects of a class with syntax and a programming example


 An object is a real world element which is identifiable entity with some characteristics (attributes)
and behavior (functions).
 An object is an instance of a class. Objects are sometimes called as instance variables.
 An object is normally defined in the main ( ) function.
Syntax:
class user_defined_name
{
Private:
Public:
};
User_defined_name object1,object2,….. object;
Where,
User_defined_name is name of the class and object1 and object2,.. object are the objects of class

II PUC COMPUTER SCIENCE (41) Page 25

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

class Student
{
private:
int rollno;
char name[20];
char gender;
int age;
public:
void get_data( );
void display( );
};
Student S1, S2, S3; //creation of objects

Here, creates object S1, S2, and S3 for the class Student.
When an object is created space is set aside for it in memory

6) Describe how objects can be used as function arguments?


A function can receive an object as a function argument.
An object can be passed to a function in two ways:
1. Copy of entire object is passed to function ( Pass by value)
2. Only address of the object is transferred to the function (Pass by reference)
 In pass by value, copy of object is passed to the function.
 The function creates its own copy of the object and uses it.
 changes made to the object inside the function do not affect the original object.

 In pass by reference, when an address of an object is passed to the function, the function di-
rectly works on the original object used in function call.
 This means changes made to the object inside the function will reflect in the original object,
because the function is making changes in the original object itself.
 Pass by reference is more efficient, since it requires only passing the address of the object and
not the entire object.

II PUC COMPUTER SCIENCE (41) Page 26

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 8:
FUNCTION OVERLOADING
1. What is function overloading? What are the advantages of function overloading?
Function Overloading means two or more functions have the same name, but differ in the number of argu-
ments or data types of arguments.
Advantages of function overloading:
 It is easier to understand the flow of information and debug.
 Code Maintenance is easy.
 Code is executed faster.
 Better understanding of the relation between the program and real-world objects.
 Eliminates the use of different function names.
2. Discuss overloaded functions with example.
 The main factor in function overloading is a function’s argument list.
 C++ can distinguish overloaded functions by the number and type of arguments.
 If there are two functions having the same name and different types of arguments or different number
of arguments, then function overloading is invoked automatically by the compiler.
 Function Overloading is also known as Compile time polymorphism.
Program to compute the volume of cone, cube and cylinder using overloaded functions.
#include<iostream.h>
#include<conio.h>
class funoverload
{
public:
int volume(int a) // Volume of Cube
{
return a*a*a;
}
double volume(double r, double h) // Volume of Cone
{
return (0.33*3.14*r*r*h);
}
double volume(double r, int h) // Volume of Cylinder
{
return (3.14*r*r*h);
}
double volume(double l, double b, double h) //Volume of Cuboid
{
return (l*b*h);
}
};
int main()
{
funoverload f1;
cout<<“Volume of the Cube: “<<f1.volume(10)<<endl;
cout<<“Volume of the Cone: “<<f1.volume(2.0,3.0)<<endl;
cout<<“Volume of the Cylinder: “<<f1.volume(2.0,3)endl;
cout<<“Volume of the Cuboid: “<<f1.volume(5.0,6.0,7.0)<<endl;
return 0;
II PUC COMPUTER SCIENCE (41) Page 27

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
getch();
}
Output:
Volume of the Cube: 1000
Volume of the Cone: 12.4344
Volume of the Cylinder: 37.68
Volume of the Cuboid: 210
The compiler selects the required function through function overloading.

3. What is the need for function overloading and write its restrictions.
 It reduces the names of functions to be remembered (by using the same name for all the functions).
 To work transparently and without any issues.
Restrictions:
 Each function in a “set of overloaded functions” must have different arguments
4. What is an inline function? Write a simple program for it.
 An Inline function is a special type of function whose body is inserted at the place where it is called,
instead of transferring the control to the function called.
 The keyword inline is used to define inline function.
Program to find the cube of a number using inline function:
#include <iostream.h>
inline int square (int a)
{
return(a*a);
}
int main( )
{
int x, y;
x=square(5);
cout<<"Square of 5 = "<<x<<endl;
y=square(10);
cout<<"Square of 10 = "<<y<<endl;
return 0;
}

5. Mention the advantages and disadvantages of inline function.


Advantage of inline function:
 The readability of the program increases.
 It also saves the overhead of return call from a function.
 There is no burden on the system for function calling.
 Very efficient code can be generated.
 The speed of execution of a program increases.
 The size of the object code is considerably reduced.
Disadvantage of inline function:
 May increase the size of the executable file.
 More memory is needed.
 If used in header file, it will make your header file size large and may also make it unreadable.
6. Explain friend function and their characteristics.
 A friend function is a non-member function that is a friend of a class.
 The friend function is declared within a class with the prefix friend.

II PUC COMPUTER SCIENCE (41) Page 28

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
 But it should be defined outside the class like a normal function without the prefix friend.
 It can access public data members like non-member functions.
Syntax:
class class_name
{
public:
friend return_type function_name (class_name);
}

Example : friend void showbalance(account);

Characteristics of friend functions


 A friend function although not a member function, has full access rights to the private and protected
members of the class.
 A friend function can be called like a normal function with/without the use of any object.
 Example: friendfunctionname(objectname);
 They are normal external functions that are given special access privileges.
 It cannot access the member variables directly and has to use an objectname.membername (Here is
a membership operator). Example: object.readdata();
 The function is declared with keyword friend. But while defining friend function it does not use either
keyword friend or :: operator.

II PUC COMPUTER SCIENCE (41) Page 29

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER -9
CONSTRUCTOR AND DESTRUCTOR
I. Two marks questions:
1. What is a constructor? Give an example.
 Constructor is a special member function which is used to initialize the member variable of an object
automatically.
 Constructor is a special member function which is automatically called when an object is created.
Ex: class A
{
int p;
public:
A()
{
P=0;
}
};

2. What is a destructor? Write the operator which is used with a destructor.


 Destructor is a special member function that destroys an object automatically.
 Tilde (~) operator is used to define a destructor.
3. Mention different types of constructor.
 Default constructor
 Parameterized constructor
 Copy constructor
4. Mention the features of default constructor.
 Default constructor does not have any arguments.
 For every object created, default constructor is automatically called.
 All objects of a class are initialized to same set of values.
5. Mention the features of Parameterized constructor.
 It accepts one or more arguments.
 It can be overloaded.
 It is possible to initialize different objects with different values.

II. Five marks questions and answers


1. Write the rules for writing a constructor function.
 Constructor name is same as the class name.
 A constructor has no return value data type.
 The constructor should be declared in public section.
 A constructor is invoked automatically when objects are created.
 A class can have more than one constructor, but all the constructors should have the same name.
 If a class has more than one constructor, then they differ in their signature.
2. Explain default constructor with an example.
 Default constructor does not accept any arguments.
 For every object created, default constructor is automatically called.
 All objects of a class are initialized to same set of values
 It allocates the memory to data member of object when it is created.
 It cannot initialize different values for different objects.
II PUC COMPUTER SCIENCE (41) Page 30

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
Ex:
#include<iostream.h>
class x
{
int a,b;
public:
x() // Default constructor
{
a=10;
b=20;
}
void display()
{
cout<<”a=”<<a<<”\nb=”<<b;
}
};
void main()
{
x ob1;
ob1.display();
}
Output:
a=10
b=20

3. Explain the features of copy constructor.


 Copy constructor is used to copy one object to another object.
 It is used to initialize an object with the values of already existing object.
 A copy constructor is invoked automatically when a new object(a2) is created and is equated to the
existing object(a1) in the declaration itself.
Ex:
x a1; // a1 existing object
x a2=a1; // copy constructor
To pass objects as value parameters of a function
Ex:
void test(x a)
{ ___________
___________
}
void main()
{
x b;
test(b);// copy constructor is invoked
}

 When an existing parameterized constructor(a1) is passed as argument to the new object(a2) during
declaration, then also copy constructor is invoked.
 Example: x a1(100,200); // parameterized constructor

II PUC COMPUTER SCIENCE (41) Page 31

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
x a2(a1); // copy constructor is invoked for object a2 with a1
 Copy constructor is not invoked explicitly.
4. Explain destructor with syntax and example.
 Destructor is a member function that destroys an object automatically.
 Destructor is used to de-allocate all the memory that was allocated for the object by the constructor.
 Tilde (~) operator is used to define a destructor.
 Destructor name is same as the class name.
 There is no return value data type for destructor.
 The destructor should be declared in public section.
 They take no arguments.
 Destructor cannot be overloaded.
 Destructor cannot be inherited.
Syntax:
class classname
{
private: // data members and methods
public:
classname( ); //constructor
void display( );
~classname( ); //destructor
};

Ex:
class num
{
private: int x;
public:
num( ) // constructor
{
cout<<”In constructor:”;
x=100;
}
void display( )
{
cout<<”Value of X=”<< x;
}
~num( ) //destructor
{
cout<<”In destructor:”;
}
};
void main()
{
num a;
a.display( );
}
Output :
In constructor:
Value of X=100

II PUC COMPUTER SCIENCE (41) Page 32

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

5. Explain the features of Default constructors.


 A class can have only one default constructor.
 Default constructor does not have any arguments.
 All objects of a class are initialized to same set of values.
 If default constructor is not defined in a program, then C++ compiler automatically generates it in a
program for every object.
 It can be explicitly written in the public section of the class.
6. Mention the features of Parameterized constructor.
 It accepts one or more arguments.
 It can be overloaded.
 It is possible to initialize different objects with different values.
 Arguments can be variables or expressions.
 The number of arguments and data type of actual argument must match with the formal argument.

II PUC COMPUTER SCIENCE (41) Page 33

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 10:
INHERITANCE
I. ONE MARK QUESTIONS AND ANSWERS :
1) What is inheritance?
Inheritance is the capability of one class to inherit properties from another class.
2) What is base class?
It is the class whose properties are inherited by another class.
3) What is derived class?
It is the class that inherits properties from base class or classes.
4) What is multiple inheritance?
If a class is derived from more than one base class, it is known as multiple inheritance.
5) Is inheritance possible in C?
No.
6) Write the syntax for defining derived class.
Syntax:
class derived_class_name : visibility_mode base_class_name
{
//Members of the derived class
};

7) What is an abstract class?


An abstract class is one that is not used to create objects. It is designed only to act as a base class (to be
inherited by other classes).
8) Name any one characteristics of public visibility mode.
The public members of a base class become public members of the derived class.
II. Two marks questions and answers :
1) What is virtual base class? Give an example.
When two or more objects are derived from a common base class, multiple copies of the base class can
be prevented by making the base class as a virtual base class. This can be achieved by preceding the
base class name with the keyword 'virtual'.
classA
{ };
class B : virtual public A
{ };
class C : virtual public A
{ };

2) What is visibility mode? What is its role?


Visibility mode(public, private and protected) basically controls the access specifier to be for inheritable
members of base class in the derived class.
The role of visibility modes:

Derived Class
Base Class
Public mode Private mode Protected mode
Private Not inherited Not inherited Not inherited
Public Public Private Protected
Protected Protected Private Protected

II PUC COMPUTER SCIENCE (41) Page 34

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
3) How does inheritance influence the working of constructors?
 If the base class constructor has parameters then it is mandatory for the derived class to have a
constructor and pass the arguments to the base class.
 When both the derived and base classes contains constructors, the base constructor is executed
first and then the constructor in the derived class is executed.
Example:
class base
{
public:
base() { } //base class constructor
};
class derived : public base
{
public:
derived() { } //derived class constructor
};

III. FIVE MARKS QUESTIONS AND ANSWERS :


1) Mention the advantages of inheritance.
 Reusing existing code
 Faster development time
 Easy to maintain
 Easy to extend
 Memory utilization
2) Explain briefly the types(levels) of inheritance.
 Single Inheritance:
If a class is derived from a single base class, it is called as single inheritance.

 Multi level Inheritance:


The classes can also be derived from the classes that are already derived. This type of inheritance is
called multi level inheritance.

 Multiple Inheritance:
If a class is derived from more than one base class, it is known as multiple inheritance.

II PUC COMPUTER SCIENCE (41) Page 35

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

 Hierarchical Inheritance:
If a number of classes are derived from a single base class, it is called as hierarchical inheritance.

 Hybrid Inheritance:
Hybrid Inheritance is combination of Hierarchical and Multilevel Inheritance.

3) Explain single level inheritance with programming example.


If a class is derived from a single base class, it is called as single inheritance.
Program to illustrate single level inheritance:
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
class base
{
private:
int rollno;
char name[10];
public:
void read( )
{
cout << “ Enter Roll No and Name “<<endl;
cin >> rollno >> name;
}
void display( )
{
cout << “ Roll No : “ << rollno <<endl;
cout << “ Name : “ << name <<endl;
}
};

class derived : public base


{
private:
int m1,m2,t;
public:
void read1( )

II PUC COMPUTER SCIENCE (41) Page 36

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
{
cout << “ Enter first and second marks : “<<endl;
cin >> m1 >> m2;
t=m1+m2;
}
void display1( )
{
cout << “ First marks = “ << m1 <<endl;
cout << “ Second marks= “ << m2 <<endl;
cout<<"Total marks= "<<t<<endl;
}
};
void main( )
{
derived d;
clrscr( );
d.read( );
d.read1( );
d.display( );
d.display1( );
getch( );
}

4) What is visibility mode? Explain public and private inheritance.


Visibility mode(public, private and protected) basically controls the access specifier to be for inheritable
members of base class in the derived class.
Public Inheritance:
 The public members of a base class become public members of the derived class.
 The private members of a base class cannot be inherited to the derived class.
 The protected members of a base class stay protected in a derived class.
Private Inheritance:
 The public members of a base class become the private members of the derived class.
 The private members of a base class cannot be inherited to the derived class.
 The protected members of a base class become the private members of the derived class.

II PUC COMPUTER SCIENCE (41) Page 37

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 11:
POINTERS
I. One mark questions and answers:
1) Write the declaration syntax for a pointer. OR How to declare a pointer?
Syntax: data-type *variable_name;
Example: int *p;
2) How do you initialize a pointer variable?
int n=25;
int *p;
p=&n;
3) Define pointer.
A pointer is a variable that holds a memory address of another variable in memory.
4) What is the purpose of new operator in C++?
The new operator is used to allocate memory for objects during the run time.
5) Name the pointer operator(Indirection operator).
Asterisk (*)
6) What is static memory allocation?
In the static memory allocation, the amount of memory to be allocated is predicted and pre known.
7) What is the purpose of delete operator in C++?
The delete operator is used to de-allocate memory of objects during the run time.
8) Which operator is used as address operator?
Ampersand(&)
9) What is free store?
Free store is a pool of unallocated memory heap given to a program that is used by the program for
dynamic allocation during execution.
10) What are object pointers?
The Pointers pointing to objects are referred to as object pointers.
II. Two marks questions and answers:
1) Write any two operations cannot be performed on pointers.
 Addition of two pointers.
 Multiplication of two pointers.
 Division of two pointers.
2) Name the operators used to allocate and de-allocate memory space dynamically.
new operator used for dynamic memory allocation.
delete operator used for dynamic memory de-allocation.
3) What are object pointers? Give its syntax.
The Pointers pointing to objects are referred to as object pointers.
Syntax: class_name *object-pointer;
Example : employee *eptr;

III. Three marks questions and answers:


1) 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 compare two pointers, if they point the elements of the same array.
 We can subtract one pointer from another pointer if both point to the same array.
 We can assign one pointer to another pointer provided both are of same type.

II PUC COMPUTER SCIENCE (41) Page 38

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
2) What is an array of pointers? Give an example.
Array of pointer is the collection of memory addresses.
Example:: int *p[5];
int a=10, b=20, c=30, d=40, e=50;
p[0]=&a; *p[0]=10;
p[1]=&b; *p[1]=20;
p[2]=&c; *p[2]=30;
p[3]=&d; *p[3]=40;
p[4]=&e; *p[4]=50;

3) Write the difference between Static memory allocation and Dynamic memory allocation.
Static allocation of memory Dynamic allocation of memory

1. Memory is allocated before the execution of the 1. Memory is allocated during the execution of
program begins. the program.
2. No memory allocation or de-allocation actions are 2. Memory bindings are established and
performed during execution. destroyed during the execution.
3. Variables remain permanently allocated. 3. Allocated only when program unit is active.
4. Implemented using stacks and heaps. 4. Implemented using data segments.
5. More memory space required. 5. Less memory space required.

4) What are the advantages of pointers?


 It is possible to write efficient programs.
 Memory is utilized properly.
 Dynamically allocate and de-allocate memory.
 Easy to deal with hardware components.
 Establishes communication between program and data.
5) Explain the use of new and delete operators in pointers.
The new operator is used to allocate memory for objects during the run time.
Example : int *p;
p=new int;
To allocate memory for array, double *dptr = new double[25];
The delete operator is used to de-allocate memory of objects during the run time.
Example: delete p;
To free dynamic array memory, delete []dptr;
a.Define a)Pointer b) Static memory allocation c) Dynamic memory allocation
a. Pointer is a variable which stores the memory address of another variable.
b. Memory allocated during the compilation is called Static memory allocation.
c. Memory allocated during the runtime is called Dynamic memory allocation
6) State the purpose of the following :
(a) Address-of operator
(b) Pointer operator
(c) new operator
(a) Address-of operator(&) returns the memory address of the variable.
(b) Pointer operator(*) that returns the value of the variable located at the address specified by its
operand.
(c) The new operator is used to allocate memory for objects during the run time.

II PUC COMPUTER SCIENCE (41) Page 39

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER-12:
DATA FILE HANDLING
I. One Mark Questions
1. Which header file is required for file handling functions in C++?
Ans: fstream.h header file is required for file handling in C++.
2. What is stream?
Ans: Stream is a sequence of bytes which act as an interface between the programs and
the files.
3. Name the streams generally used for I/O.
Ans: Input stream and output stream
4. What are output streams?
Ans: The stream that receives data from the program is known as output stream.
5. What are input stream?
Ans: The stream that supplies data to the program is known as input stream.
6. What is the significance of fstream.h file?
Ans: It is used to implement input output facilities in C++ file.
7. Mention the use of filebuf.
Ans: It sets the file buffers to read and write.
8. What is fstreambase?
Ans: It is the base class for fstream, ifstream and ofstream classes.
9. Mention the methods of opening file within C++ program.
Ans: There are 2 methods used to open a file
1) Opening file using constructor
2) Opening file using open( ) member function
10. Write the member functions belonging to fstream class.
Ans: open( ) and close( )
11. What is ifstream class?
Ans: It provides input operations for file which is used to read from file.
12. What is ofstream class?
Ans: It provides output operations for file which is used to write on file
13. Write the member functions belonging to ofstream class.
Ans: put( ) and write( )
14. Write the member functions belonging to ifstream class
Ans: get( ) and read( )
15. Name the stream classes supported by C++ for file input.
Ans: ifstream class
16. Name the stream classes supported by C++ for output.
Ans: ofstream class
17. Mention the file modes.
Ans: in,out and app mode
18. What is ios::in?
Ans: ios::in opens file for reading only.
19. What is ios::out?
Ans: ios::out opens file for writing only.
20. Mention the types of file.
Ans: There are 2 types of file
a) Text file b) Binary file
21. What is text file?
II PUC COMPUTER SCIENCE (41) Page 40

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
Ans: Text file is a file that stores information in ASCII characters.
22. What is binary file?
Ans: Binary file is a file that contains information in the same format as it is held in
memory.
23. What is the advantage of saving the data in binary form?
Ans: Binary files are faster to read and write.
24. What is the use of write( ) function?
Ans: write( ) function belongs to the class ofstream and used to write binary data to a file.
25. What is the use of writeln( ) function?
Ans: writeln( ) function is used to write whole line of text.
26. What is the use of get( ) function?
Ans: get( ) function reads a single character from the ifstream.
27. What is the use of put( ) function?
Ans: put( ) function writes a single character to the ofstream.
28. What is the use of getline( ) function?
Ans: getline( ) function is used to read whole line of text.
29. What is the use of read( ) function?
Ans: read( ) function reads binary data from a file.
30. What is the use of write( ) function?
Ans: write( ) function writes binary data to a file.
31.What is a file pointer?
Ans: File pointer points to a position in file which is determined by the offset(number of bytes) from the
beginning or from the end.
32. Mention different types of file pointers.
Ans: 1.Input pointer or get pointer
2.Output pointer or put pointer
33. What is the function of get( ) pointer?
Ans: The get pointer points to the element to be read in the next input operation.
34. What is the function of put( ) pointer?
Ans: The put pointer points to the location where the next element has to be written.
35. When file is opened in read mode give the position of the get pointer.
Ans: The position of the get pointer is at the beginning of the file.
36. When file is opened in write mode give the position of put pointer
Ans: The position of the put pointer is at the beginning of the file.
37. What is the use of seekp( ) function?
Ans: The seekp( ) function moves the put pointer to a specified location from the beginning of a file.
38. What is the use of seekg( ) function?
Ans: The seekg( ) function moves the pointer to a specified location from the beginning
of a file.
39. What is the use of tellp( ) function?
Ans: The tellp( ) function return current position of the put pointer.
40. What is the use of tellg( ) function?
Ans: The tellg( ) function return current position of the get pointer
41. What is the use of eof( ) function?
Ans: eof( ) is a member function used to detect an end of file.
42. What is error handling function?
Ans: eof( ) member function is used for error handling which detect the end of file.

II PUC COMPUTER SCIENCE (41) Page 41

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

II. Two marks questions:


1. What is stream? Name the streams generally used for file I/O.
Ans: Stream is a sequence of bytes which act as an interface between the programs and
the files.The streams used for I/O are input stream and output stream .
2. What are input and output stream?
Ans: The stream that supplies data to the program is known as input stream.
The stream that receives data from the program is known as output stream.
3. Mention the methods of opening file within C++.Discuss any one.
Ans: File can be opened in 2 ways
1) Opening file using constructor
2) Opening file using open( ) member function
1. Opening file using constructor
This method is used when a single file is used with a stream.
Syntax:
ofstream ofstream_object(“file_name”);
ofstream_object is an object of type ofstream
“file_name” is name of a file to be opened for output purpose.
Example:
ofstream fout(“result.dat”);
4. Write the member functions belonging to fstream class.
Ans: get( ),getline( ),put( ),write( ),

5. Differentiate between ifstream class and ofstream class


ifstream ofstream
1.It is a stream class to read from files 1.It is a stream class to write on files
2.This class supports input operations 2.This class supports output operations

6. Differentiate between read( ) and write( )


read( ) write( )
1. It belongs to the class ifstream 1.It belongs to the class ofstream
2.It reads binary data from a file. 2. It writes binary data to a file.

7. Differentiate between get( ) and getline( )


get( ) getline( )
1. It reads a single character from the associated 1.It is used to read a whole line of text
stream.
2.Syntax: ifstream_object.get(ch); 2. Syntax: fin.getline(buffer,size);
8. Write the member functions belonging to ofstream class
put( ),write( ),seekp( ) , tellp( )
9. Write the member functions belonging to ifstream class
get( ),getline( ),read( ),seekg( ),tellg( )
10. Name the stream classes supported byC++ for file input and output
ifstream and ofstream
11. What are the advantages of saving data in binary form
1.Binary file is faster
2. It takes less space to store the data.
III. Three Marks Questions:
1. Mention the methods of opening file within C++ program. Discuss.

II PUC COMPUTER SCIENCE (41) Page 42

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
Ans: File can be opened in 2 ways
1) Opening file using constructor
2) Opening file using open( ) member function
1.Opening file using constructor
This method is used when a single file is used with a stream.
a) Opening a file for output purpose only using an object of ofstream class and the
constructor.
Syntax:
ofstream ofstream_object(“file_name”);
Example:
ofstream fout(“result.dat”);
b) Opening a file for input purpose only using an object of ifstream class and constructor
Syntax:
ifstream ifstream_object(“file_name”);
Example:
ifstream fin(“result.dat”);
2. Opening file using open( )
a) Opening a file for ouput purpose only using an object of ofstream class and open() member function.
Syntax:
ofstream_object.open(“file_name”);
Example:
ofstream fp;
fp.open(“student.dat”);
b) Opening a file for input purpose only using an object of ifstream class and open( ) member function
Syntax:
ifstream_object.open(“file_name”);
Example:
ifstream fp;
fp.open(“book.dat”);
2. Differentiate between ifstream class and ofstream class
Ans:
ifstream ofstream
1.It is a stream class to read from files 1.It is a stream class to write on files
2.This class supports input operations 2.This class supports output operations
3.It contains open( ) with default input mode 3.It contains open( ) with default output mode

3. Differentiate between read( ) and write()


Read() Write()
1. It belongs to the class ifstream 1.It belongs to the class ofstream
2. It reads binary data from a file. 2. It writes binary data to a file.
3.Syntax: ifstream_object.read((char*)&variable, 3.Syntax:
sizeof (variable)); ofstream_object.write((char *) &variable, sizeof
(variable));
4. Differentiate between get( ) and getline( ).
get( ) getline( )
1. It reads a single character from the associated 1.It is used to read a whole line of text
stream.
2.Syntax: ifstream_object.get(ch); 2. Syntax: ifstream_object.getline(buffer,size);
Example: Example:
II PUC COMPUTER SCIENCE (41) Page 43

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
char ch=’a’; char book[size];
ifstream fin(“text.txt”); ifstream fin;
fin.get(ch); fin.getline(book,size);

5. Name the stream classes supported by C++ for file input and output.
Classes Meanings
ifstream It is a stream class to read from files. It provides input operations for file. It inherits
get( ),getline( ),read( ) ,seekg( ) and tellg( ) functions from istream class

ofstream It is a stream class to write on files. It provides output operations for file. It inherits
put( ),write( ), seekp( ) and tellp( ) functions from ostream class.
fstream It is stream class to both read and write from/to files. It provides support for simultaneous
input and output operations. It inherits all the functions from istream and ostream classes.

6. Mention the types of file. Explain.


Ans: There are 2 types of files
1. Text file2. Binary file
1. Text File
It is a file that stores information in ASCII characters. Each line of text is terminated with
a special character known as EOL(End of line) character or delimiter character. In this file
certain internal translation takes place.
2. Binary File
It is a file that contains information in the same format as it is held in memory. No
delimiters are used to terminate line of text. Also no translation takes place
7. What are the advantages of saving data in binary form and text form?
1. Binary files are faster and easier for a program to read and write than the text file.
2. It takes less space to store data.
3. It eliminates conversion between internal and external representation.
IV. Five marks questions:
1. What are input output streams?
 The stream that supplies data to the program is known as input stream. It reads the
data from the file and transfers it to the program.
 The stream that receives data from the program is known as output stream. It writes the
received data to the files.
2. What is significance of fstream.h header file.?
fstream.h is a header file of C++ standard library which is used to implement input/output operations. The
fstream library predefines a set of operations for handling files related to input and output. It defines certain
classes that help to perform file input and output operations. It consists of ifstream ,ofstream and fstream
classes.
ifstream It is a stream class to read from files. It provides input operations for file. It inherits
get( ),getline( ),read( ) ,seekg( ) and tellg( ) functions from istream class
ofstream It is a stream class to write on files. It provides output operations for file. It inherits
put( ),write( ), seekp( ) and tellp( ) functions from ostream class.
fstream It is a stream class to both read and write from/to files. It provides support for
simultaneous input and output operations. It inherits all the functions from istream
and ostream classes.

II PUC COMPUTER SCIENCE (41) Page 44

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
3. Mention the methods of opening file within C++ .Discuss.
Ans: File can be opened in 2 ways
1) Opening file using constructor
2) Opening file using open( ) member function
1. Opening file using constructor
This method is used when a single file is used with a stream.
a) Opening a file for output purpose only using an b)Opening a file for input purpose only using an
object of ofstream class and the object of ifstream class and constructor
constructor.
Syntax: Syntax:
ofstream ofstream_object(“file_name”); ifstream ifstream_object(“file_name”);
Example: Example:
ofstream fout(“result.dat”); ifstream fin(“result.dat”);

2. Opening file using open( )


a) Opening a file for ouput purpose only using an b) Opening a file for input purpose only using an
object of ofstream class and open() member function. object of ifstream class and open( ) member
function
Syntax: Syntax:
ofstream_object.open(“file_name”); ifstream_object.open(“file_name”);
Example: Example:
ofstream fp; ifstream fp;
fp.open(“student.dat”); fp.open(“book.dat”);
4. Differentiate between ifstream class and ofstream class
ifstream ofstream
1.It is a stream class to read from files 1.It is a stream class to write on files
2.This class supports input operations 2.This class supports output operations
3.It contains open( ) with default input mode 3.It contains open( ) with default output mode
4.It inherits get( ),getline( ),read( ),seekg( ) and 4. It inherits put(),write(),seekp() and tellp()
tellg( ) functions from istream function from ostream
5.Example: ifstream fb; 5.Example: ofstream fb;
fb.open(“text.dat”); fb.open(“text.dat”);
5. Differentiate between read( ) and write( ) with example.
read( ) write( )
1. It belongs to the class ifstream 1.It belongs to the class ofstream
2.It reads binary data from a file. 2. It writes binary data to a file.
3.Syntax: 3.Syntax: fout.write((char *) &variable,
fin.read((char*)&variable,sizeof(variable)); sizeof(variable))
4.Example 4.Example
student s; student s;
ifstream fin(“std.dat”,ios::binary); ofstream fout(“std.dat”,ios::binary);
fin.read((char*)&s,sizeof(s)); fout.write((char*)&s,sizeof(s));

II PUC COMPUTER SCIENCE (41) Page 45

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

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


get( ) getline( )
1. It reads a single character from the associated 1.It is used to read a whole line of text
stream.
2.Syntax: ifstream_object.get(ch); 2. Syntax: ifstream_object.getline(buffer,size);
Example: Example:
char ch=’a’; char book[size];
ifstream fin(“text.txt”); ifstream fin;
fin.get(ch); fin.getline(book,size);

7. Explain file modes.


File mode parameter Meaning Stream Type
ios::app Append to end of file ofstream
ios::in Open file for reading only ifstream
ios::out Open file for writing only ofstream
ios::ate Open file for updation and move the file ifstream,ofstream
pointer to the end of file
ios::binary Opening a binary file ifstream,ofstream
fstream fout(“text.dat”,ios::out); Open text.dat in output mode
fstream fin(‘text.dat”,ios::in); Open text.dat in input mode
fstream file;
file.open(“example.bin”,ios::out|ios::app|ios::binary);
Open the file “example.bin” in binary mode to add data.
8. Differentiate between ios::in and ios::out
ios::in ios::out
1.It belongs to ifstream class 1.It belongs to ofstream class
2.It opens file for reading only 2.It opens file for writing only
3.Example: 3.Example:
fstream fin(‘text.dat”,ios::in); fstream fout(“text.dat”,ios::out);
Open text.dat in input mode open text.dat in output mode

II PUC COMPUTER SCIENCE (41) Page 46

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 13:
DATABASE CONCEPTS
I. ONE MARK QUESTIONS :
1. What is record?
A row in a table is called as record.
2. Define data mining.
Process of analyzing and picking information from large volume of data.
3. What is tuple?
Collection of related fields is known as tuple. ( OR ) Each row in a table is called as tuple.
4. What is an attribute?
Each column of a table is identified with distinct header called attribute. ( OR ) Named column(header) of a
table is called as attribute.
5. What is an entity?
An entity is an object OR a record contains a set of attributes.
6. What is data base?
A database is a collection of large amount of related data. In other words, it is collection of tables. OR
It is a collection of related data organized with a specific structure(table) stored on a suitable storage
device.
7. What is table?
A table is a collection of related data elements organized in terms of rows and columns.
8. What is key?
It is a column or columns which identifies each row or tuple. ( OR ) It is a set of one or more attributes
whose combined values are unique in all the rows of a table.
9. What is foreign key?
A foreign key is a key used to link two tables together. ( OR )
It is an attribute in one table which matches with the primary key attribute of another table.
10. Define primary key.
The key (attribute) which is used to uniquely identify each record in a table is called primary key.
OR Primary key is an attribute(field) in a table which is unique in each row(record) of a table.
11. What is domain?
It is defined as a set of allowed values for one or more attributes.
12. What is normalization?
Normalization is a step by step process of removing the different kinds of redundancy and anomaly one step
at a time from the database. ( OR ) It is the process of removing anomalies, data redundancy and data incon-
sistency from the database.
II. Two marks questions:
1. Define primary key and candidate key.
 Primary key: The key(attribute) which is used to uniquely identify each record in a table is called as
primary key.
 Candidate key: When more than one attribute serves as unique, then each attribute is called as candi-
date key.
2. What is data independence? Mention the types of data independence.
Data independence is an ability of a database to modify the schema definition at one level without affecting
in the other level.
 Physical data independence
 Logical data independence

II PUC COMPUTER SCIENCE (41) Page 47

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
3. What are the advantages of ISAM?
 It permits quick access to selected records without searching the entire file.
 It permits efficient and economical use of sequential processing techniques when the activity ratio is
high.
 It combines best features of sequential and direct access.
4. What is DBMS? Give an example of DBMS software.
 DBMS is a software that allows definition, creation and manipulation of data in a database.
 Examples for DBMS: Oracle, SQL Server
5. Write the differences between data and information.
 Data is a collection of facts, numbers, letters or symbols which can be processed to produce meaning-
ful information. Ex- 16,Ram
 Processed data with some definite meaning is called as information. Ex; studentname=’Ram’ age=16
6. Mention the data base users.
The broad classification of database users are
1. Application programmer and system analysts.
2. End users
3. Database Administrators(DBA)
4. Database Designers.
III. Three Marks questions
1. Explain data base users.
 DBA (Database administrator): Responsible for authorization access to database, monitoring the user
of database, acquiring the needed software and hardware resources.
 Database designers: Responsible for identifying what data to be stored in a database, choosing appro-
priate structure to represent and store the data.
 Application programmer: Implement the user requirement in the program.
2. Briefly explain 1-tier database architecture.
 In one-tier architecture, the user directly uses the only entity DBMS.
 Any changes made will be directly done on DBMS itself.
 This architecture is used by data base designer and programmers.
3. Briefly explain 2-tier database architecture.
 Two-tier client/server architecture is used for User Interface program and application programs that
runs on client side.
 It uses an interface called ODBC (Open Database Connectivity) which provides an API that allows
client-side programs to call the DBMS.
 A client programs can connect to several DBMS’s.
4. Briefly explain 3-tier database architecture.
 3-tier architecture is commonly used architecture for web applications. Intermediate layer called Ap-
plication server or

II PUC COMPUTER SCIENCE (41) Page 48

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
 Web Server is used to store the web connectivity software and the business logic.
 These are part of application used to access the right amount of data from the data base server.
 This layer acts like a medium for sending partially processed data between the database server and the
client.
4. Explain Radom/direct file organization.
 Direct access file organization allows immediate direct access to individual records on the file. Here
the records are stored in memory based on the address generated by the “hashing algorithm” H(key
field)=address, This algorithm also takes care of conflict which may arise when 2 or more key field
are mapped to the same address. This type of organization also allows the file to access sequentially.
5. Write the different symbols used in E-R diagram with their significance.
The different notations or symbols for E-R diagram are

6. Mention the database models and explain any one.


The broad classification of database models is,
1. Hierarchical data model
2. Network data model
3. Relational data model
Relational data model: In the relational data model, all data are maintained in the form of tables, known as
relations consisting of row and columns. Each row represents an entity and a column represents an attribute
of the entity. The relationship between the two tables is implemented through a common attribute in the ta-
bles and not the physical links or pointers.
Advantages:
 Makes the querying much easier.
 Programmer friendly
 Easy to maintain the data organized in two-dimensional tables called relations.
 It has a strong mathematical foundation.
 This model is extremely simple and easy to implement through the use of keys

Hierarchical data model: This data Model organizes the data in a tree like structure. All the nodes are
linked to each other with a definite hierarchy. This model represents the nodes as one-to-one and one-to-
many relationships.
Advantages:
 This model is easy to design and simple.
 The data access is quite predictable in the structure.
 Process of retrieval and updates are optimized.
Network data model: This data model organizes the data in the form of graph. All the nodes are linked to
each other without any hierarchy. It is a powerful model, but database design is complicated. This model has
many-to-many relationships on data. It has one parent node and many child nodes known as dependants;
hence the data access is easier.
8. Mention any three advantages of random/direct file organization.
II PUC COMPUTER SCIENCE (41) Page 49

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
 The access to and retrieval of records is quick and direct.
 Records need not be stored in a sequence prior to processing.
 Best used for online transaction.
IV. Five marks questions:
1. Explain any five applications of DBMS.
1. Educational application- database are used to store the student’s information in the schools, colleges
and universities.
2. Medical application- patient’s records/history is stored in database for quick access.
3. Business applications: In shops, malls and share market business transactions are stored in the data-
base for online access.
4. Banking applications: The transaction details such as deposit, withdrawal or transfer of amount from
one ledger to another is stored in data bases. Thus, generating the accounting statement is easy.
5. Telecommunication: It will maintain the records of following: Calls made ,Monthly bill, Balance
maintenance for prepaid cards, Communication networks
6. Railway and Airlines: Railway and airlines tickets are reserved from different places of the world, so
central database system is used where accessing is networks to do the reservation.
2. Write the advantages (features) of DBMS.
1. Centralized data Management: In the database, the data is stored at a central location and is shared
among multiple users. Thus main advantage of DBMS is centralized data management.
2. Controlled data redundancy: Data redundancy means duplication of data item in different record
and files. With the help of DBMS the data redundancy can be eliminated to a large extent.
3. Data sharing: The data stored in the database can be shared among multiple users and multiple ap-
plication programs if needed.
4. Data independence: Ability of modifying the data at one level without affecting the schema in the
other level.
5. Data security: Data is highly secured because it permits the data access through authorized channel.
4. Write the difference between manual and electronic data processing system.
Manual Data Processing Electronic Data Processing
Volume of data processed is limited in a given time More data can be processed in given time
Large quantity of paper is required No paper is required
Speed is less Speed is more
Accuracy is limited Always accurate
Storage medium is paper Secondary storage is used
Repetitive task reduce the efficiency of human being Computer is never bored of repetitive task
4. Briefly explain the data processing cycle.
 Data Collection:
 The required data may exist in different places and in different forms. All required data items must be
gathered together is called as data collection.
 Data input: The mechanism of providing the raw data into a data processing system.
 Data Process: Conversion of data into information is called as data process Processing requires series
of operation(functions). Those functions are Classification, sorting, verification, calculation, summa-
rization, generating the reports etc.
 Data output: After the successful data processing activity, processed data is presented to the user in
the form of reports (hardcopy and softcopy).
 Data storage: The result must be stored in the secondary storage medium for future use.
 Maintenance: Depending on significance of information it has to be maintained with possible securi-
ties.

II PUC COMPUTER SCIENCE (41) Page 50

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 14
SQL
1) SYNTAX AND EXAMPLE FOR CREATE COMMAND.
This command is used to create a new table
SYNTAX:
CREATE TABLE tablename(
column1 datatype,
column2 datatype,
column3 datatype,
....
);

EXAMPLE:
CREATE TABLE STUDENT
(
Regnum number(6),
Name varchar(25),
Combination char(5),
Dob date,
Fees number(4,2),
);

2) SYNTAX AND EXAMPLE FOR ALTER COMMAND.


This command is used to add a new column or change data type of a column or delete a column
from existing table.
SYNTAX:
a) Alter table tablename add (columnname datatype);
b) Alter table tablename modify (columnname datatype);
c) Alter table tablename delete columnname;

EXAMPLE:
Alter table student add (addressvarchar(30));
Alter table student modify (addressvarchar(35));
Alter table student delete (address);

3) SYNTAX AND EXAMPLE FOR DROP COMMAND.


This command is used to delete an existing table from the database.
This command also removes records stored in the database.

SYNTAX:
DROP TABLE table_name;

EXAMPLE:
DROP TABLE Shippers;

4) SYNTAX AND EXAMPLE FOR DELETE COMMAND.


This command is used to remove existing records from the table.

II PUC COMPUTER SCIENCE (41) Page 51

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
SYNTAX:
DELETE FROM table_name WHEREcondition;

EXAMPLE:
a) To delete all the records whose fees is less than 15,000.
DELETE FROM Student WHERE fees < 15000;
b) To delete all the records.
DELETE FROM Student;

5) SYNTAX AND EXAMPLE FOR UPDATE COMMAND.


This command is used to modify the existing data in the records of the table.
SYNTAX:
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;

EXAMPLE: //To decrease the fees of all student records by 500


UPDATE Student set fees = fees-500;

6) SYNTAX AND EXAMPLE FOR INSERT COMMAND.


This command is used to add new rows (records) into a table.
SYNTAX:
INSERT into tablename (column1, column2, ………) values (val1, val2, …..);

EXAMPLE:
//to insert data only for selected columns
INSERT into Student (Regnum, Name, Combination) values (123, ‘John’, ‘ceba’);

7) SYNTAX AND EXAMPLE FOR SELECT COMMAND.


This command is used to fetch data from the table. The output is also a table.
SYNTAX:
SELECT columnlist
FROM table_name
WHERE condition;

EXAMPLES:
a) SELECT Regnum, fees FROM Student;
b) SELECT * FROM Student;
c) SELECT Regnum, Name FROM Student WHERE totalmarks> 500;

8) WRITE THE DATATYPES SUPPORTED BY SQL.

1. CHARACTER [(length)] or CHAR [(length)]


2. VARCHAR (length)
3. BOOLEAN
4. SMALLINT
5. INTEGER or INT
6. DECIMAL [(p[,s])] or DEC [(p[,s])]
7. NUMERIC [(p[,s])]

II PUC COMPUTER SCIENCE (41) Page 52

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
8. REAL
9. FLOAT(p)
10. DOUBLE PRECISION
11. DATE
12. TIME
13. TIMESTAMP
14. CLOB [(length)] or CHARACTER LARGE OBJECT [(length)] or CHAR LARGE
15. OBJECT [(length)]
16. BLOB [(length)] or BINARY LARGE OBJECT [(length)]

9) WHAT IS A NULL VALUE?

 A field(column) with a NULL value, is a field with no value.


 A field with a NULL value is one that has been left blank during record creation.

10) WRITE THE DIFFERENCE BETWEEN ORDER BY AND GROUP BY.

 ORDER BY is used to sort the query result by specific columns.


 GROUP BY is used to arrange identical data into groups.

SYNTAX OF ORDER BY:


SELECT col1, col2, … FROM tablename WHERE condition ORDER BY col1, col2,
EXAMPLE:
SELECT Name, Combination FROM Student ORDER BY Name;

This command gives list of names and combination in sorted order of names (ascending
order).
SYNTAX OF GROUP BY:
SELECT col1, col2, … FROM tablename WHERE condition GROUP BY col1, col2, .. ;
EXAMPLE:
SELECT Name, Combination FROM Student GROUP BY Combination;
This command gives combination wise list of names and combination

11) WRITE ANY FIVE GROUP FUNCTIONS.


Group functions are built-in SQL functions that operate on groups of rows and return one value for
the entire group. These functions are: COUNT, MAX, MIN, AVG, SUM, DISTINCT.

 COUNT (): This function returns the number of rows(records) in the table that satisfies the condition
specified in the WHERE condition. If the WHERE condition is not specified, then the query returns the total
number of rows present in the table.
Example:
a) To know the number of employees in a particular department, the query would be:
SELECT COUNT (*) FROM employee WHERE dept = 'Electronics';
b) To know the total number of employees in all the department, the query would take the form:
SELECT COUNT (*) FROM employee;

 DISTINCT(): This function is used to select the distinct rows (without duplicates) present in
the table.
II PUC COMPUTER SCIENCE (41) Page 53

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
Example:
To select all distinct department names, present in employee table, the query would be:
SELECT DISTINCT dept FROM employee;

 MAX(): This function is used to get the maximum value from a column.
Example:
To get the maximum salary drawn by an employee, the query would be:
SELECT MAX (salary) FROM employee;

 MIN(): This function is used to get the minimum value from a column.
Example:
To get the minimum salary drawn by an employee, the query would be:
SELECT MIN (salary) FROM employee;

 AVG(): This function is used to get the average value of a numeric column.
Example:
To get the average salary, the query would be
SELECT AVG (salary) FROM employee;

 SUM(): This function is used to get the sum of a numeric column


Example:
To get the total salary given to the employees,
SELECT SUM (salary) FROM employee;

13. EXPLAIN THE LOGICAL OPERATORS USED IN SQL.


a) IN OPEARTOR: The IN operator checks a value within a set of values separated by
commas and retrieve those rows from the table which are matching.
EXAMPLE:
SELECT Regnum, Combination FROM Student WHERE Combination IN (‘PCMB’, ‘CEBA’);
//this command gives only those records that match with combination PCMB and CEBA.
b) NOT IN OPEARTOR: The NOT IN operator checks a value within a set of values
separated by commas and retrieve those rows from the table which are not matching.
EXAMPLE:
SELECT Regnum, Combination FROM Student WHERE Combination NOT IN (‘PCMB’, ‘CEBA’);
//this command gives those records that do no match with combination PCMB and CEBA.
c) BETWEEN OPEARTOR: The BETWEEN operator tests an expression against a range. The range con-
sists of a beginning expression, followed by an AND keyword and an end expression.
EXAMPLE:
SELECT Regnum, Marks FROM Student WHERE Marks BETWEEN 550 AND 600;
//this command gives the list of students whose marks are between 550 and 600.
d) AND OPEARTOR:
EXAMPLE:
SELECT Regnum, Combination, Marks FROM Student WHERE Combination = ‘PCMB’ AND
Marks>500;
//this command gives the list of students whose combination is PCMB and marks are more
than 500.
SELECT Regnum, Combination FROM Student WHERE Combination IN (‘PCMB’, ‘CEBA’);
//this command gives only those records that match with combination PCMB and CEBA.
II PUC COMPUTER SCIENCE (41) Page 54

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
e) OR OPEARTOR:
EXAMPLE:
SELECT Regnum, Combination FROM Student WHERE Combination = ‘PCMB’ OR Combination=
‘HEBA’;
//this command gives the list of students whose combination is either PCMB or HEBA.
f) IS NULL OPEARTOR:
EXAMPLE:
SELECT Regnum, Fees FROM Student WHERE Fees IS NULL;
//this command gives the list of students whose fees field is left blank.
12) EXPLAIN SQL CONSTRAINTS.
SQL constraints are used to specify rules for the data in a table.If there is any violation
between the constraint and the data action, the action is aborted.
Constraints can be column level or table level. Column level constraints apply to a column,
and table level constraints apply to the whole table.
The following constraints are commonly used in SQL:

1. NOT NULL - Ensures that a column cannot have a NULL value


2. UNIQUE - Ensures that all values in a column are different
3. PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table
4. FOREIGN KEY - Uniquely identifies a row/record in another table
5. CHECK - Ensures that all values in a column satisfies a specific condition
6. DEFAULT - Sets a default value for a column when no value is specified
7. INDEX - Used to create and retrieve data from the database very quickly

13) EXPLAIN STRING FUNCTIONS (CHARACTER FUNCTIONS) IN SQL.

II PUC COMPUTER SCIENCE (41) Page 55

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER - 15
NETWORKING CONCEPTS
One mark Questions:
1) Define Network Or computer network.
Ans: A network is a connection of autonomous computers. ( OR )
A computer network is an interconnection of two or more computers that are able to exchange information.
2) Expand TCP/ IP.
Ans: Transmission Control Protocol / Internet Protocol.
3) Expand HTTP.
Ans: Hyper Text Transfer Protocol
4) Expand FTP.
Ans: File Transfer Protocol.
5) Expand GSM.
Ans: Global System for Mobile communication.
6) Expand CDMA.
Ans: Code Division Multiple Access.
7) Expand SMS.
Ans: Short Message Service.
8) What is a server?
Ans: A server is a computer that contains all information that can be shared by other computers. ( or )
A Server is a computer that facilitates the sharing of data, software, and hardware resources like
printers, modems etc on the network.
9) Define client.
Ans: Any computer connected to server.
10) Write any one application of network.
Ans: Chat, Video conferencing.
11) Define chatting.
Ans: Chatting is the process of communicating, interacting or exchanging “typed in messages” over
the internet.
12) What is WAN?
Ans: It is type of network which covers large geographical area. ( OR )
The network which spreads across the countries is known as WAN.
13) Write an example for antivirus.
Ans: Kaspersky, Quick Heal.
14) What is Topology?
Ans: Network Topology refers to the arrangement of computers and other devices in a network.
( OR )
The actual appearance or layout of networking is called as network topology.
Two Mark Questions:
1) Write any two differences between LAN and WAN.
LAN:

 Covers a few kilometres. Spans entire country.


 Data transfer rate is more than one mbps (1-10 mbps).
 Date transfer rate less than one mbps.
 Complete ownership by a single organization(private).
WAN:

II PUC COMPUTER SCIENCE (41) Page 56

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
 Owned by multiple organization.
 Very low error rates. Comparatively high error rates.

2) Explain the goals of Networking.


a) Resource Sharing:
Irrespective of the physical location of the resources and the user, all programs, data and peripheral are made
available to anyone on the network.
b) Reliability and Security:
Files and programs on a network can be protected from illegal copying or modification. Hence it is reliable
and also restricts the user by providing the password.
c) Cost:
Networking versions of application software cost less when compared to the individual license copies.
It also provides better price to performance ratio.
d) Speed:
Network provides very rapid method of sharing and transferring files(irrespective of physical location).
e) Communication Medium:
Presence of networking and email systems makes the user to communicate online in a faster and cost-
effective manner.

3) Explain communication modes and its types with example.


The direction (one way/ two way) of flow of information between two communication devices is called as
communication modes.
a) Simplex: Here data transfer occurs between only one transmitter and one or more receivers.
Here full bandwidth of channel is used for travelling signals across transmitter to receiver.
Eg: Radio, TV etc.
b) Half Duplex: Here data transfer occurs in both directions alternatively. That is one device is sending and
other can only receive the data and vice versa.
Eg: Walkie- Talkies, Marine/ Aviation etc.
c) Full Duplex: Here data is transmitted simultaneously in both directions on transmission path. Here each
serves(acts) as transmitter and receiver.
Eg: Modern Telephone

4) Explain the different types of switching techniques.


Linking of multiple paths between the sender and receiver is called switching.
There are three types of switching techniques:
a. Circuit Switching
b. Message Switching
c. Packet Switching

Circuit Switching:
Here a physical connection between sender and receiver is established in an unbroken path (dedicated path)
and then data is transmitted from the source to destination
E.g: In telephone system, a complete path (end to end) must exist before communication can take
place
Message Switching (Store and forward):
Here there is no dedicated path is established between the sender and receiver. But the sender appends a
“destination address” to the data.

II PUC COMPUTER SCIENCE (41) Page 57

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
Here the source computer sends the data to the switching office first, which stores the data in the buffer, then
free link to another switching office is established and then sends the message to the next station. This pro-
cess is continued till the data is delivered to the receiver.
E.g: Telex forwarding

Packet Switching:
Here data is broken into distinct, addressed, fixed size parts called as packets, that can be transferred sepa-
rately via different paths. Each packet contains the address of sender, address of destination, sequence num-
ber and some data. Finally, at the receiver end, packets are reordered by sequence number and the original
message is reconstructed.

FIVE Mark Questions:


1) What is Topology? Write a note on network topologies.
Network Topology refers to the arrangement of computers and other devices in a network.

1. Star Topology
In this type of topology, all the computers are connected to a single hub or a switch through a cable. This hub
is the central node and all others nodes are connected to the central node.
Advantages of a Star Topology

 Easy to install and wire.


 No disruptions to the network when connecting or removing devices.
 Easy to detect faults.
Disadvantages of a Star Topology

 Requires more cable length than a linear topology.


 If the hub, switch, or concentrator fails, nodes attached are disabled.
 More expensive than linear bus topologies because of the cost of the hubs, etc.
2. Ring topology
In a ring topology, all computers are connected via cable that loops in a ring or circle.

 A ring topology is a circle that has no start and no end.


 Each node connected to two neighbouring computers.
 Data accepted from one node transmitted to another.
 Data travels in one direction, from the node to node around the ring.
 Signal amplified at each node before being passed.
Advantages of Ring Topology

 Short cable length


 No wiring closet space required
 Suitable for optical fibers.
 Each client has equal access to resources.
Disadvantages

 Node failure causes network failure


 Difficult to diagnose faults
 Network reconfiguration is difficult

II PUC COMPUTER SCIENCE (41) Page 58

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
3.Tree Topology:
 A tree topology combines characteristics of linear bus and star topologies.
 It consists of groups of star-configured workstations connected to a linear bus backbone cable.
 The tree network topology uses two or more star networks connected together.
 The central computers of the star networks are connected to a main bus. Thus, a tree network is a bus
network of star networks.
 Best suited for applications having hierarchical flow of data and control.

Advantages of a Tree Topology

 Point-to-Point wiring for individual segments.


 Supported by several hardware and software venders.
 Network can be easily extended.
Disadvantages of a Tree Topology

 Use large cable length.


 If the backbone line breaks, the entire segment goes down.
 More difficult to configure and wire than other topologies.
4. Mesh Topology:
 In this topology each node is connected to two or more than two nodes.
 It is a point-to-point connection to other nodes or devices.
 Traffic is carried only between two devices or nodes to which it is connected.
 This topology is robust, provides security and privacy.
 Overall cost of this network is too high.
5. Graph Topology:
 In this topology, nodes are connected together in arbitrary fashion.
 A link may or may not connect two or more nodes.
 There may be multiple links also. But if a path is establishedin two nodes via one or more
 links is called a connected graph.

2) What is a virus? Write the characteristics (symptoms) of a computer virus.


Computer virus is a malicious program that requires a host computer and is designed to make a system sick.

 It is able to replicate.
 It requires a host program as a carrier.
 It is activated by external action.\
 Its replication ability is limited to the system it entered.

3) Give the measures for preventing virus.

 Never use a CD without scanning it for viruses.


 Always scan files downloaded from the internet.
 Never boot your PC from floppy.
 Write protect your disks and make regular backup.
 Use licensed software.
 Password protects your PC.
 Install and use antivirus software.
 Keep antivirus software up to date.
 Some of the antiviruses are: Kaspersky, Quick Heal, K7, Norton 360, AVG, Avast, MacAfee.
II PUC COMPUTER SCIENCE (41) Page 59

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

4) Explain any five applications of network communication.


SMS:
Short Message Service(SMS) is the transmission of short text messages (up to 160 characters) to and from a
mobile phone, fax machine and/or IP address.
Messages must be no longer than some fixed number of alpha-numeric characters and contain no images or
graphics.

Chat:
Exchange of typed in message by several people who are using the internet at the same time as you are.
In telephonic conversations, you say something, people hear it and respond, and you hear their responses on
the spot and can reply instantly.

Video Conferencing:
A two-way videophone conversation among multiple participations is called Video Conferencing.

Wi-fi:
Wi-Fi is short for Wireless Fidelity, which lets you connect to the internet without a direct line
from your PC to the ISP. For Wi-Fi to work, you need:

 A broadband internet connection.


 A wireless router, which relays your internet connection from the “wall” to the PC.
 A laptop or desktop with a wireless internet card or external wireless adapter.

Voice mail:
It is a method of storing voice message electronically for later retrieval by the intended recipients.

II PUC COMPUTER SCIENCE (41) Page 60

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 16
INTERNET AND OPEN SOURCE CONCEPTS

One Marks Questions:


1.What is Open Source Software?
Open Source Software is a software which can be freely used but it does not have to be free of
charge
2. Define E-Commerce.
E-commerce is the trade of goods and services with the help of telecommunication and
computers.
3. Write any 2 Web browsers.

 Internet Explorer
 Netscape Navigator.
4. What is Web server?
Web Server is a WWW server that responds to the requests made by web browsers. Each website has a unique address
called URL (Uniform Resource Locator). ( or )
Web server is an internet host computer that may store thousands of websites. It responds to the requests made by the
web browsers.
5. Define Freeware
Freeware is a software which is available free of cost and which allows copying and further distribution, but not modi-
fication and whose source code is not available.
6. Expand WWW.
World Wide Web.
7.What is HTTP?
Hyper Text Transfer Protocol is a network protocol used to send the message from source to destination.
8.What is web browser?
It is a software that enables the user to navigate through the www, to view webpage and move from one website to an-
other website.
8.What is WWW?
It is a “set of protocols” that allow users to access any document on the internet through the naming system based on
URL.

Three Marks questions:


1. Write the advantages of E-Commerce

 Global participation.
 Optimization of resources.
 Improved market intelligence and strategic planning.
 Buyer makes a buying decision, create the purchase order but does not print it.
 Reduced time to complete business transaction, particularly from delivery to payment.

2. Write the different types of E-Commerce


1. Business-to-Business(B2B)
2. Business-to-Commerce(B2C)
3. Consumer-to-Consumer(C2B)
4. Consumer-to-Consumer(C2C)
1. Business-to-Business (B2B): The exchange of services, information and/or products from one business to another
business partners. Ex: Ebay.com
2. Business-to-Consumer (B2C): The exchange of services, information and/or products from business to consumers.

II PUC COMPUTER SCIENCE (41) Page 61

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
3.Consumer-to –Business(C2B): Customer directly contact with business vendors by posting their project work with
set budge online so that the needy companies review it and contact the customer directly with bid. The consumer re-
views all the bids and selects the company for further processing. Ex: guru.com, freelancer. com.
4. Consumer-to-Consumer(C2C): Electronic commerce is an internet facilitated form of business(commerce).
3. Write a note on OSS.
OSS refer to Open Source Software, which refer to software whose source code is available to customers and it can be
modified and redistributed without any limitations. An OSS may come free of cost or with a payment of nominal
charges that its developers may charge in the name of development, support of software.
4. What is URL? Write the syntax and example.
HTTP uses internet addresses in a special format called a Uniform Resources Locator or URL.
OR
Address of file on internet is called as URL.
URLs look like this:
Type://address/path OR protocol://host/location
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.
http://encycle.msn.com/getinfo/styles.asp
5. What is Shareware? Write its limitations.
It is a software with the right to redistribute the copies.
But it is stipulated that if one intends to use the software often after a certain period of time,
then a license fee should be paid.
Limitations:

 Source code is not available.


 Modifications to the software are not allowed.

6. Define E-commerce. Write the various technologies and services used in E-commerce.
E-commerce is the trade of goods and services with the help of telecommunication and computers.

 EDI (Electronic Data Interchange)


 Email
 EFT (Electronic Fund Transfer)
 Digital Cash
 Electronic forum (Online application forms)
 Bulletin boards
 Electronic banking

II PUC COMPUTER SCIENCE (41) Page 62

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY

CHAPTER 17
WEB DESIGNING
One marks questions:
1. Dine HTML.
HTML (Hyper Text Markup Language) is a language, which makes it possible to present information on Internet.
2. Define DHTML.
It is a new HTML extension that will enable a webpage to react user input without sending request to the web server.
OR
Dynamic HTML is a collective term for a combination of Hypertext Markup Language (HTML) tags and options that
can make Web more animated and interactive than previous versions of HTML.
Dynamic HTML can allow Web documents to look and act like desktop applications or multimedia productions.
3. Define XML.
XML is a text-based markup language used for data interchange on the web.
OR
XML is an eXtended Markup Language for documents containing structured information. Structured information con-
tains both content and some indication of what role that content plays.
4. Use of HTML.
To create websites, such as Dreamweaver.
5. Define Web hosting
Web hosting is a service that allows organization and individuals to post a website or webpage on the internet.
OR
A registrant establishes a domain name, leases a block of server space and uploads their webpage.
6. Define Web Scripting
The process of creating and embedding scripts in a web page is known as web scripting.
7. Define Free Hosting
Some famous websites offer to host some WebPages for no cost is called as free hosting.
8. How to add background colour and image to HTML page
To add background image, we need to specify image in the <body >tag.
<body background=”image.gif”>

Three marks question:


1. Explain web-hosting. Mention different types of web-hosting.
Web hosting is a service that allows organization and individuals to post a website or webpage on the internet.
Different types of web-hosting: -
1. Free hosting
2. Virtual or shared hosting
3. Dedicated hosting
4. Collocation hosting

2.Briefly explain any three HTML tags.


a. <big>text</big> increase the size by one
b. <small>text</small> decrease the size by one
c. <p> text</p> paragraph break after the text.
d. <b> or <i> defines bold or italic text only

3. Explain types of web scripting


Scripts are broadly of following two types:
I. Client –side Scripts
II. Server-side scripts
Client-side scripts: -
Client-side script 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. Eg: Java, VB script
II PUC COMPUTER SCIENCE (41) Page 63

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
KARNATAKA RESIDENTIAL EDUCATIONAL INSTITUTIONS SOCIETY
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. Eg: ASP, JSP

4. Give the features of Dynamic HTML?

 An object-oriented view of a Web page and its elements


 Cascading style sheets and the layering of content
 Programming that can address all or most page elements
 Dynamic fonts

5. What are the steps involved in hosting a webpage.


Steps to Host a Website:
Step1: Decide what type of website you want typically find
Typically find 2 types of websites:
(i). Static or Basic Websites: Static websites are simple websites with one or more web pages (called HTML
pages). You can build them on your computer with software like Dreamweaver and then up load the pages
to your host’s
(ii). Dynamic Websites: Dynamic websites contain information that changes, depending on the time of day, the
viewer and other factors.
Step 2: Choose Your Hosting Server
Basically, two types of hosting platforms
Linux Hosting, Windows Hosting.
Step 3: Select Your Web Hosting Plan

 Shared Hosting:
 VPS Hosting
 Dedicated Hosting:
 Cloud Hosting:
Step 4: Change Your DNS Address
After you have purchased your web hosting, you will get Name Servers (also known as Domain Name
Servers or DNS)
Step 5: Upload Your Website
You can now upload your website to your account by connecting to the server using either cPanel’s File Manager or
FTP Client (such as FileZilla) – after which your website will go live.

II PUC COMPUTER SCIENCE (41) Page 64

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
Model question paper
II PUC
Subject: COMPUTER SCIENCE (41)
Time: 3 Hrs 15 Mins Max Marks: 70
Total No. Of Questions: 49
PART – A
I. Answer any TEN questions. Each question carries one mark. 1 x 10 = 10
1) What is a microprocessor?
2) Give the other name of Boolean Algebra.
3) Define truth valued variable.
4) What is a logic gate?
5) Give an example for primitive data structure.
6) Define object-oriented programming.
7) What is the use of scope resolution operator (::)?
8) What is the use of member function in a class?
9) Which symbol is used for a destructor function?
10) Give the syntax for a pointer declaration.
11) Define a tuple in database.
12) What is a primary key?
13) Define simplex communication mode.
14) What is free software?
15) What is the use of HTML?

PART - B

II. Answer any FIVE questions. Each question carries two marks. 2 x 5 = 10
16) Expand the terms SDRAM and DDRAM.
17) Prove that X + XY = X.
18) Give the logic symbol and working of AND gate.
19) What is the need for function overloading?
20) Give any two advantages of parameterised constructor.
21) Give any two differences between static and dynamic memory allocation.
22) Differentiate between text file and binary file.
23) Define data and information.
24) What is web browser? Give an example.
25) Give the general structure of HTML program.

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
PART - C

III. Answer any FIVE questions. Each question carries THREE marks. 3 x 5 = 15
26) What is cache memory? Explain its types.
27) Write truth table and standard symbol for NOR gate.
28) What is an array? Mention any two types of arrays.
29) Give any three advantages of inheritance.
30) Explain different operations performed on pointer.
31) Mention and explain any three modes of opening a file in C++.
32) Explain any three data types used in SQL.
33) What is LAN? Explain.
34) Mention any three services or technologies of e-commerce.
35) What is web hosting? Mention any two web hosting methods.

IV. Answer any SEVEN questions. Each question carries FIVE marks. 5 x 7 = 35
36) Reduce F(A,B,C,D)=∑(0,2,4,6,8,9,10,11,12,14) Using K – map.
37) Briefly explain different operations performed on linear data structure.
38) What is stack data structure? Write algorithms for PUSH and POP operations.
39) Explain memory representation of two-dimensional array using row-major
ordering.
40) Write any five applications of object-oriented programming.
41) Explain class definition with syntax and example.
42) Briefly explain characteristics of friend function.
43) Write the rules for constructor function.
44) What is inheritance? Explain hierarchical and hybrid inheritance.
45) Differentiate between manual and electronic data processing.
46) Mention any five advantages of DBMS.
47) Explain any five arithmetic operators used in SQL.
48) Mention DML commands in SQL. Explain any two commands.
49) Explain any five network devices.

*****

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960


For More Study Materials Subscribe to KABBUR PUBLICATIONS YouTube Channel
II PU Computer Science BluePrint-2022
Total Questions – 49
VSA SA LA E Total
UNIT DESCRIPTION
(1 Mark) (2 Marks) (3 Marks) (5 Marks) Marks
Chapter 1 Typical
5 Hrs configuration of 1 1 1 ------- 06
Computer system
Chapter 2
Boolean algebra 2 1 - 1 09
10 Hrs
Chapter 3
Logic Gates 1 1 1 ------- 06
5 Hrs
Chapter 4 Data structures
1 1 2 19
15 Hrs
Chapter 5 Review of C++
3 Hrs covered in First ------- ------- ------- ------ ---
PUC
Chapter 6
OOP concepts 1 ---- 1 06
4 Hrs
Chapter 7
Classes and objects 2 ------ ----- 1 07
6 Hrs
Chapter 8 Function
------ 1 ------ 1 07
3 Hrs Overloading
Chapter 9 Constructors and
1 1 ---- 1 08
8 Hrs Destructors
Chapter 10
Inheritance ----- ----- 1 1 08
8 Hrs
Chapter 11
Pointers 1 1 1 ------ 06
7 Hrs
Chapter 12
Data File handling ------- 1 1 ------ 05
6 Hrs
Chapter 13
Database concepts 2 1 2 14
8 Hrs
Chapter 14
SQL commands ------ ------ 1 2 13
12 Hrs
Chapter 15 Networking
1 ----- 1 1 09
10 Hrs Concepts
Chapter 16 Internet and Open
1 1 1 ----- 06
5 Hrs source concepts
Chapter 17
5 Hrs Web Designing 1 1 1 ----- 06

Total Marks 15 20 30 75 135


Total No of
Questions to be 10/15 5/10 5/10 7/14 70/135
answered

KABBUR PUBLICATIONS YouTube Channel, Contact 9738237960

You might also like