II PUC passing package updated on march 2024
II PUC passing package updated on march 2024
1
Types:
1) Serial Port:
In this port the data is transmitted bit by bit at a time
It is also called Communication port
It is used to connect Mouse, Modem and old printers
2) Parallel Port:
In this port group of bits of data (8 bits) is transmitted at a time
It is used to connect Printers and some type external storage devices
3) USB port:
It is a Plug and Play device which transfers 12MB of data per second, which is used to connect
audio player, Keyboard, Pendrive etc
It is a Single, Standardized, easy to use way to connect a variety of I/O devices to a computer
4) Game port: it is used to connect joystick to the computer
5) Ethernet port: It connects network and high speed internet
6. Explain Cache memory in detail
It is a small and high speed memory placed between the CPU and RAM and it increases the speed of CPU by
supplying data faster than RAM
The data transfer between the CPU and RAM is a time consuming process because CPU works
faster than RAM. Therefore to increase the speed of data supply the cache memory is introduced.
2
a) Standby Power Supply(SPS) or Offline UPS:
In this UPS, if there is any problem in the main power supply then it switch over to the battery
and supply the power. It requires several milliseconds to supply the power, this results the system
may restarts in certain cases
b) Online UPS:
It supplies the power directly from its own inverter. If there is any problem in main power system,
then the inverter supplies the power from battery. Hence there is no break in power supply.
9. Explain the types of Motherboard.
XT Motherboard ( eXtended Technology)
AT Motherboard ( Advanced Technology)
Baby AT Motherboard
ATX Motherboard ( Advanced Technology eXtended)
XT Motherboard:
It is old type of motherboard
It contains DIMM RAM slots, ISA slots, 12 pin power connector
AT Motherboard:
contains PGA socket, SDRAM slots, PCI slots
20 pin power connector
Baby AT Motherboard:
contains MPGA Processor socket, DDRDRAM slots
it contains PCI slots, AGP slots
20 pin and 24 pin power connector
ATX Motherboard:
Latest motherboards all are called as ATX motherboards, designed by ATX form factor
It contains MPGA processor sockets, DDRRAM slots, PCI slots, AGP slots,
It contains 20 pin and 24 pin power connector and ports.
Example: Pentium-IV, Dual Core, Core 2 Duo, Quad Core, i3, i5 and i7 processors.
2. Logic Gates
1. What is logic gate?
Logic gate is an electronic circuit design with one or more inputs and only one output, which is used to
perform logical operations.
2. Name the basic Logic gates.
AND gate
OR gate
NOT gate
3. Name the Combinational gates.
NAND gate
NOR gate
XOR gate
XNOR gate
4. What is Universal Gate?
Universal gate is a gate by which we can realize all three basic gates by using single type of gate
5. Name the Universal gates.
NAND gate
3
NOR gate
6. What is another name of NOT gate?
Inverter
7. Write circuit symbol and truth table for NOT gate.
A A
0 1
1 0
In AND gate the output is 1 only when all inputs are 1 and in remaining all cases the output will be 0
2 inputs A B A.B
0 0 0
0 1 0
1 0 0
1 1 1
3 inputs
A B C A.B.C
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
In OR gate the output is 0 only when all inputs are 0 and in remaining all cases the output will be 1
2 inputs
A B A+B
0 0 0
0 1 1
4
1 0 1
1 1 1
3 inputs A B C A+B+C
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Write Standard (Logic Circuit diagram) and Truth table for NAND gate.
In NAND gate the output is 0 only when all inputs are 1 and in remaining all cases the output will be 1
2 inputs
A B A.B A.B
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
A B C A.B.C A.B.C
0 0 0 0 1
3 inputs
0 0 1 0 1
0 1 0 0 1
0 1 1 0 1
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 0
11. Explain the working of NOR gate
or
5
Write Standard (Logic Circuit diagram) and Truth table for NOR gate.
In NOR gate the output is 1 only when all inputs are 0 and in remaining all cases the output will be 0
2 inputs
A B A+B A+ B
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
A B C A+B+C A+ B+C
3 inputs
0 0 0 0 1
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 1 0
1 0 1 1 0
1 1 0 1 0
1 1 1 1 0
12. Write Standard (Logic Circuit diagram) and Truth table for XOR gate.
2 inputs
A B A⊕B
0 0 0
0 1 1
1 0 1
1 1 0
3 inputs
A B C A⊕B⊕C
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
13. Write Standard (Logic Circuit diagram) and Truth table for
XNOR gate. A B A⊙B
2 inputs 0 0 1
60 1 0
1 0 0
1 1 1
3 inputs A B C A⊙B⊙C
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
7
OR
Write circuit for AND, OR, NOT gates using only NOR gates
OR
Prove NOR is gate an Universal gate
3. BOOLEAN ALGEBRA
1. Boolean Postulates:
If x≠0 then x=1 where x is Boolean variable
If x≠1 then x=0 where x is Boolean variable
AND Relations
0.0=0
0.1=0
1.0=0
1.1=1
OR Relations
0+0=0
0+1=1
1+0=1
1+1=1
Not Operations
0=1
1=0
2. Boolean theorems.
0.X=0
1.X=X
0+X=X
1+X=1
Indempotence Law:
8
X.X=X
X+X=X
Complementarity Law:
X. X =0
X+ X =1
Involution law:
X́ =X
Practice above theorems in perfect induction method and truth table
9
5. Prove X+XY = X
LHS=X+XY
∵ 1+Y =1
=X (1+Y)
=X (1)
=X
6. Prove X(1+Y) =X
LHS= X (1+Y)
=XX + XY
=X + XY
=X (1+Y)
=X.1
=X
=RHS
7. Prove X + X Y = X+Y
LHS = X + X Y
= (X+ X ) (X+Y) use distributive law
= (1) (X+Y)
= (X+Y)
=RHS
8. Prove (X+Y) (X+Y ) = X
LHS = (X+Y) (X+Y )
= XX + XY +XY + YY
=X + X (Y +Y) + 0
=X + X (1)
=X + X
=X
=RHS
9. Prove X ( X +Y) = XY
LHS = X ( X +Y)
=X X +XY
=0 +XY
=XY
=RHS
10. Prove XY+XY = X
LHS = XY+XY
= X (Y +Y )
= X (1)
= X= RHS
11. Prove (X+Y) (X+Z) = X +YZ
LHS =(X+Y) (X+Z)
=XX + XZ + XY + YZ
=X + XZ + XY + YZ
=X (1 + Z + Y) + YZ
=X (1) + YZ
=X + YZ =RHS
10
12. State and Prove DeMorgan’s Theorem
Statement1: when AND Product of two Boolean variables is complemented then we get OR sum two
complemented variables
i.e X . Y = X + Y
Proof:
Statement2: when OR Sum of two Boolean variables is complemented then we get AND product two
complemented variables
i.e X +Y = X . Y
Proof:
11
4. DATA STUCTURES
1. What is data structure?
It is a specialized format for organizing and storing data
2. Types of data structure
Primitive Data structure
Non-Primitive Data structure
3. Primitive Data structure: these are readily available in the programming language and directly operated upon
by machine level instructions
Ex: int, float, char, double
4. Non-Primitive Data structure: these are not readily available they are derived from the Primitive Data
structure
Ex: Array, Stack, Queue, Linked list, Tree, Graph
5. Types of Non-Primitive Data structure
Linear Data structure
Non-Linear Data structure
6. Linear Data structure:
In this data structure there is a linear relationship between the data elements. i.e if we know the address of one
element then we can easily find its next and previous element
12
11. Algorithm for Traversing
Step1: start
Step2: input n
Step3: for (i=0 to n-1)
Step4: read a[i]
[End for i]
Step5: for (i=0 to n-1)
Step6: output a[i]
[End for i]
Step7: stop
12. Algorithm to find location using Linear Search
Step1: loc=-1
Step2: for (i=0 to n-1)
Step3: if (ele==a[i]) then
Step4: loc=i
Step5: goto step 6
[End if]
[End for i]
Step6: if (loc>=0) then
Step7: print loc
else
Step8: print “element is not found”
[End if]
Step7: stop
14
6) return
19. Algorithm to insert an item at rear end of Queue
1) if(rear==n-1) then
2) print “Queue is full”
3) exit
[end if]
4) if(front==NULL) then
5) front=0
6) rear=0
else
7) rear=rear+1
8) [end if]
9) a[rear]=item
10) return
20. Algorithm to delete an item at front end of Queue
1) if(front==NULL) then
2) print “Queue is empty”
3) exit
[End if]
4) item=a[front]
5) if(front==rear) then
6) front=NULL
7) rear=NULL
else
8) front=front+1
[end if]
9) Return
It is a collection of items in an order where the elements are inserted and deleted at the same end top
Ans: it is a collection of items in an order where the items are inserted at rear end and deleted at the front end
b) Circular Queue: in this queue all nodes are treated as circular and last element follows first element
c) Double Ended Queue: In this queue insertion and deletion can be done in both sides
d) Priority Queue: In this queue an element can be inserted and removed from any position based on their
priority
5. Introduction to OOP
1. What is Object Oriented Programming (OOP)?
It is the Principle of design and development of programs using modular approach
Ex: C++, Java, Mat Lab, C#
2. Advantages of OOP (Object Oriented Programming)
The programmes are modularized based on the principle of classes and objects
Data is encapsulated along with functions. Therefore external function cannot access the data
Easy to develop a complex software
The concept of data abstraction separates the object specification and object implementation
Creation and implementation of OOP code is easy and reduces software development time
OOP code can communicate through message passing
3. Applications of OOPs
Used to develop Computer Graphics Applications
Used to design CAD/CAM software
Used to design Object Oriented data base
Used to design Real time systems
Used to implement Simulation and Modelling
Used to implement Artificial Intelligence
Used to design User interface ex: Windows
Inheritance:
Polymophism:
6. Difference between Object oriented Programming(OOP) with Procedural Oriented Programming (POP)
OOP POP
The program is divided into number The program is divided into number
of small subprograms called function of objects
It follows top down approach It follows bottom-up approach
Importance is not given to data but Importance is given to data
importance is given only to
procedure
Data is not hidden Data is hidden
Data may communicate with each Object may communicate with each
other through functions other through functions
class class_name
{
private: member data;
member functions;
protected: member data;
member functions;
public: member data;
member functions;
};
18
Ex: class sum
{
private: int a,b;
protected: int c;
public:
void process()
{
a=10;
b=20;
c=a+b;
cout<<”sum is=”<<c;
}
};
void main()
{
sum s;
s.process();
}
Ex:
class sum
{
private: int a,b;
protected: int c;
public:
void process()
{
a=10;
b=20;
c=a+b;
cout<<”sum is=”<<c;
}
};
void main()
{
sum s;
s.process();
}
19
3. Explain defining member function inside the class definition.
Ans: in this method a function is defined inside the class without using scope resolution operator
Synatx:
class class_name
{
private:
public: return_type function_name(args)
{
------------------------
------------------------
}
};
Ex:
class sum
{
private: int a,b,c;
public:
void process()
{
a=10, b=20;
c=a+b;
cout<<”sum is=”<<c;
}
};
void main()
{
sum s;
s.process();
}
4. Explain defining member function outside the class definition.
Ans: in this method a function can be defined outside the class by using scope resolution operator.
Synatx:
class class_name
{
private:
public: return_type function_name(args);
};
return_type class_name::function_name(args)
{
------------------------
------------------------
------------------------
}
20
Ex:
class sum
{
private: int a,b,c;
public:
void process();
};
void sum::process()
{
a=10;
b=20;
c=a+b;
cout<<”sum is=”<<c;
}
void main()
{
sum s;
s.process();
}
Ans: once a class is defined we can create any number of objects for that class
Synatx:
class class_name
{
private: member data;
member functions;
protected: member data;
member functions;
public: member data;
member functions;
};
main()
{
class_name object1, object2..........;
}
21
Ex:
class sum
{
private: int a,b,c;
public:
void process()
{
a=10;
b=20;
c=a+b;
cout<<”sum is=”<<c;
}
};
void main()
{
sum s;
s.process();
}
22
Ex:
class shapes
{
public:
float area(float a)
{
return(a*a);
}
float area(float l, float b)
{
return(l*b);
}
float area(float l, float b, float h)
{
return(l*b*h);
}
};
void main()
{
sum s;
s.process();
}
2. Explain with a programming example to overload a function with different number of arguments.
Ans: In function overloading we are using two or more functions have same name with different number of
argument or different types of arguments.
Ex:
class shapes
{
public:
float area(float a)
{
return(a*a);
}
float area(float l, float b)
{
return(l*b);
}
float area(float l, float b, float h)
{
return(l*b*h);
}
};
Void main()
23
{
shapes s;
cout<<”area of square=”<<s.area(5.2);
cout<<”area of rectangle=”<<s.area(5.2, 7.5);
cout<<”area of cube=”<<s.area(5.2,5.8,9.1);
}
4. Explain with a programming example to overload a function with different data type arguments.
Ans: In function overloading we are using two or more functions have same name with different number of
argument or different types of arguments.
Ex:
class sum
{
public:
void process(int x, int y)
{
cout<<”sum of two integer numbers=”<<x+y;
}
void process(float x, float y)
{
cout<<”sum of two float numbers=”<<x+y;
}
};
Void main()
{
sum s;
s.process(5,10);
s.process(8.5,14.8);
}
class class_name
{
private:
public:
friend return_type friend_function_name(args);
};
return_type friend_function_name (args)
{
-------------
--------------
}
Ex:
class sum
{
private: int a,b;
public: void input()
{
a=10, b=20;
}
friend void process(sum);
};
void process(sum s1)
{
cout<<”sum is=”<<s1.a + s1.b;
}
25
void main()
{
sum s;
s.input();
process(s);
}
8. Write the characteristics of Friend function.
A friend function is not a member function of class but it has full access rights to private and protected
data of class
Friend function cannot be called using the object of that class
Friend function can be declared in anywhere of the class (either in private or protected or public)
It cannot access members directly, with the support of object only it can access the members
It is declared with the keyword friend but while defining it does not use either friend or scope resolution
operator
8. Constructors and destructors
1. What is constructor? Write syntax and example.
Ans: it is a special member function of class which is executed automatically when the object is created and used
to initialize the object
Syntax:
class class_name
{
private: variables;
public: class_name()
{
----------------
----------------
----------------
}
};
Ex:
class sum
{
private: int a,b;
public: sum()
{
a=10;
b=20;
cout<<”sum is=”<<a+b;
}
};
void main()
{
sum s;
}
26
2. Rules for writing a constructor or Characteristics of a constructor
The name of constructor is the same name as that of the class name
There is no return type for constructor
The constructor should be declared in the public section
Constructors are executed automatically when the objects are created
It is not possible to refer the address of constructors
Constructors makes implicit calls to the new and delete operations
3. Types of constructors
Default constructor
Parameterized constructor
Copy constructor
4. Explain default constructor with syntax and example.
class_name::class_name( )
{
-------------
--------------
}
void main()
{
class_name object_name;
}
Ex:
class sum
{
private: int a,b;
public: sum( )
{
a=10, b=20;
cout<<”sum is=”<<a+b;
}
};
void main()
{
sum s;
}
5. Write the features of default constructor.
For every object is created, the default constructor is automatically invoked
All objects are initialized to same values
6. Explain parameterized constructor with syntax and example
Ans: a constructor which accepts one or more arguments is called Parameterized constructor
Ex:
class sum
{
private: int a,b,c;
public: void input()
{
a=10, b=20;
}
void process(sum &s)
{
c=s.a + s.b;
cout<<”sum is =”<<c;
}
};
void main()
{
sum s1, s2;
s1.input();
s2.process(s1);
}
28
9. Explain destructors with syntax and example.
It is a special member function which is automatically executed when the object is destroyed.
Synatx:
class class_name
{
private:
public:
class_name()
{
------------
------------
}
~class_name()
{
-------------
-------------
}
};
Ex:
class sum
{
private: int a;
public: sum()
{
a=10;
}
~sum()
{
cout<<”object destroyed”;
}
};
void main()
{
sum s;
}
10. Characteristics of destructors OR Rules for destructors
Destructor name is same as that of class name and preceded by tilde(~) operator
There is no return type for destructor
Destructors are invoked automatically when the objects are destroyed
Destructors cannot be overloaded
It is not possible to take the address of a constructor
29
9. INHERITANCE
1. What is inheritance? Explain single inheritance with example.
it is the capability of one class to inherit the properties from another class.
Single Inheritance: in this inheritance a class is derived from single base class i.e one base class and one derived
class
Father
Son
Syntax:
class base_class
{
protected: --------
public: ---------
};
class derived_class: visibility_mode base_class
{
private: -----------
protected: -----------
public: -------------
};
Ex:
class addition
{
protected: int a,b;
public: void input()
{
a=10,b=20;
}
};
class sum:public addition
{
protected: int c;
public: void process()
{
c=a+b;
cout<<”sum is =”<<c;
}
};
void main()
{
sum s;
s.input();
s.process();
}
30
2. Explain different types of inheritance.
Single Inheritance
Multi level Inheritance
Multiple Inheritance
Hierarchical Inheritance
Hybrid Inheritance
Single Inheritance: in this inheritance a class is derived from a single base class i.e only one base class and one
derived class
Base class Father
Multi-level Inheritance: in this inheritance a class is derived from a class that is already derived
Derived class n
Multiple Inheritance: in this inheritance a class is derived from more than one base class
Derived class
King Queen
Prince
31
Hierarchical Inheritance: in this Inheritance, number of classes is derived from a single base class
Derived class
Staff
Base Class
Fruits
Derived class 1 Derived class 2
Apple Banana
Derived class 3
Fruit salad
3. Advantages of Inheritance
We can reuse an existing code
Faster development time
Easy to maintain
Easy to extend
Memory Utilization
Private Inheritance:
The private members of base class cannot be inherited
The protected members of base class becomes private in derived class
The public members of base class becomes private in derived class
Syntax:
32
Ex:
class addition
{
private: int a;
protected: float b;
public: void input();
};
class sum:private addition
{
public: void process();
};
Protected Inheritance:
The private members of base class cannot be inherited
The protected members of base class stay protected in derived class
The public members of base class becomes protected in derived class
Public Inheritance:
The private members of base class cannot be inherited
The protected members of base class becomes public in derived class
The public members of base class stay public in derived class
33
10. POINTERS
1. What is pointer?
Pointer is a special variable, which stores the address of another variable
2. Write declaration syntax of pointer variable.
data_type *variable;
Ex: int *ptr;
3. Write declaration syntax and example for Integer pointer variable.
int *variable;
Ex: int *ptr;
4. Write declaration syntax and example for float pointer variable.
float *variable;
Ex: float *ptr;
5. Write declaration syntax and example for Character pointer variable.
char *variable;
Ex: char *ptr;
34
Syntax:
data_type *array_name[size];
Ex: int a,b,c,d,*ptr[4];
ptr[0]=&a;
ptr[1]=&b;
ptr[2]=&c;
ptr[3]=&d;
14. Write difference between static and dynamic memory Allocation
3. types of files
Text file
Binary file
Text file: in this file the data is stored in the form of ASCII characters
Binary file: in this file the data is stored in the form of binary digits
35
4. Explain different file opening modes.
ios::out
ios::in
ios::trunk
ios::app
ios::ate
ios::binary
iss::out -in this mode the file is opened to write data to file
iss::in -in this mode the file is opened to read data from file
iss::app -it appends new data at the end of output file
iss::binary -the file is opened in binary form
5. Functions
a) get(): it reads a single character from text file
b) getline(): it reads an entire line from text file
c) put(): it writes a single character to text file
d) read(): it reads binary data from binary file
e) write(): it writes binary data to binary file
f) seekg(): it moves the get pointer to the specified location in the file
g) seekp(): it moves the put pointer to the specified location in the file
h) tellg(): it returns the current position of get pointer
i) tellp(): it returns the current position of put pointer
36
read()
write()
10. Difference between ifstream and ofstream
ifstream ofstream
2) Input File Stream. It contains input 2) Output File Stream. It contains output
operations related functions operations related functions
3) It contains get(), getline(), read(), 3) It contains put(), write(), seekp(),
seekg(), tellg() tellp()
Process
Storage
Attribute
Relationship
SQL:
1. Expand SQL:
Ans: Structured Query Language
It provides Commands for creation, deletion, accessing and modifying the data in database table.
2. Explain arithmetic operators in SQL.
it is used to perform arithmetic operations
Ex: a=10 b=20
+ Addition a+b=30
- Subtraction a-b= -10
* multiplication a*b=200
/ Division- it returns quotient value a/b=0.5
3. Explain Comparison
% Modulus- it returns remainder value a%b=0 (Relational) operators in SQL.
it is used to perform Relational operations i.e it compares the relation between the operands
= To check whether the values of two variables are equal or not a=b is not true
!= To check whether the values of two variables are equal or not a!=b is true
<> To check whether the values of two variables are equal or not a<>b is not true
> To check whether the value of one variable is greater than the second variable or not a>b is not true
< To check whether the value of one variable is Less than the second variable or not a<b is true
>= To check whether the value of one variable is greater or equal than the second variable a>=b is not true
Ex: a=10 b=20
38
4. Explain Logical operators in SQL.
AND: it allows the existence of multiple conditions in an SQL statement WHERE clauses. True when all
conditions are true otherwise the output will be false
OR: the OR operator is used to combine multiple conditions in an SQL statement. false when all conditions
are false otherwise the output will be true
NOT: the NOT operator reverses the meaning of the logical operator
IS NULL: This operator is used to compare a value with a NULL value.
BETWEEN: it is used to search the values within a range
ALL: it is used to compare a value to all values in another value set.
5. What is DDL? Write the DDL commands.
DDL-Data Definition Language. It is used to perform operations on table ie create, alter and delete the table
Ex: Create, Alter, Drop
6. What is DML? Write the DML commands.
DDL-Data Manipulation Language. It is used to perform operations on Records(rows) ie Insert, modify and
delete the Records
Ex: Insert, Update, delete
7. Explain CREATE command with syntax and example.
It is used to create a new table
Synatx: Ex:
CREATE TABLE Table_Name CREATE TABLE STUDENT
( (
Column1 datatype,
RegNo NUMBER(6),
Column2 datatype,
………………………….. Name VARCHAR2(25),
………………………… Fees NUMBER(4,2)
Co1umn N datatype );
PRIMARY KEY (one or more columns)
);
Ex:
INSERT INTO STUDENT (RegNo, Name, Combination) VALUES (1401, ‘MANEESH’, ‘pcmc’);
40
<center>: it displays the information at center of webpage
<br>:it is used to add a single line break. It does not have closing tag.
<p> : it adds a paragraph break after the text.
16. Explain General Structure of HTML:
Ans: Refer in notes
17. What is web browser? Give examples for web browsers.
It is used to display web pages
Ex: Chrome, Mozilla firefox, Internet explorer, opera
18. What is E-Commerce? Explain its types.
It is the way of selling and buying goods and services over the internet (Online)
1) Business to Business(B2B): The trading of goods, services and informationfrom one business to another
Business organization.
2) Business-to-Consumer (B2C): The exchange of services, information and products from a Business
organization to a consumer.
3) Consumer-to-Business(C2B): Customer directly contact with business company by giving technology, idea
and advice
4) Consumer-to-consumer (C2C): it is the business between two consumers without involving any business
organization as a mediator
19. What is web hosting? Explain its types.
Hosting an application in a server where the content is readily available to any user in the internet
Types: 1) free hosting: hosting webpages at free of cost
2) Virtual or shared hosting: hosting web pages on the webserver along with other websites
3) Dedicated hosting: hosting web pages in server where an entire web server is reserved for one
Website
20. What is web Scripting? Explain its types.
It is the Process of creating and embedding scripts in a webpage
Client side scripts:
The Client side scripts are downloaded at the client end and then interpreted and executed by the browser
Server side Scripts:
Server side scripting enables the completion of a task at server end and then sending the result to the
client end
43