PU-II COMPUTER SCIENCE
SOLVED MODEL QUESTION PAPER 3
Answer all the
questions.
Each question carries 1 mark. (10 X 1 = 10)
Each question carries 1 mark. (10 X 1 = 10)
1. Expand the term SMPS.
Ans: Switched Mode Power Supply.
2. Draw XOR gate.
Ans: 3. Name the principle on which the stack works.
4. What is private access specifier?
Ans: private access means a member data can only be accessed by the
member function. Members declared under private are accessible only within the
class.
5. Define free store.
Ans: free store is a pool of unallocated memory heap given to a program
that is used by the program for dynamic allocation during execution.
6. What is normalization?
Ans: it is a process of organizing a data in
database.
7. Define cookies.
Ans: cookies are the messages that a web
server transmits to a web browser so that a web server can keep track of the
user’s activity on a specific website.
8. Name any two antivirus softwares.
Ans: avast, quick heal,k7 etc.
9. What is e-commerce?
Ans: e-commerce is the trade of goods and
services with the help of telecommunications and computers.
10. Define DHTML.
Ans: Dynamic HyperText Markup Language refers
to web content that changes each time it is viewed.
Answer any five of
the following.
Each question carry 2 marks. (5 X 2 = 10)
Each question carry 2 marks. (5 X 2 = 10)
11. State and prove involution law.
Ans: it states that the complement of a
variable is complemented again, we get the same variable.
~(~X)=X
proof: if x=0 then ~x=1 and ~(~x) = ~1 = 0 = x
if x=1 then ~x=0 and ~(~x) = ~0 = 1 = x
12. Draw AND gate with its two variable truth table.
13. What is an object?
Ans: object is an entity which has physical existence in the real world. An
object is a collection of data members and associated member functions. Each
object is identified by a unique name
14. Define destructor with an example.
Ans: A
destructor is a special member function that will be executed automatically
when an object is destroyed.
#include<iostream.h>
#include<conio.h>
class num
{
int x;
public:
num();
void display();
~num();
};
num::num()
{
cout<<”In constructor:\n”;
x=100;
}
num::~num()
{
cout<<”In desctructor:\n”;
}
void num::display()
{
cout<<”Value of x=”<<x;
}
void main()
{
num n;
n.display();
getch();
}
#include<conio.h>
class num
{
int x;
public:
num();
void display();
~num();
};
num::num()
{
cout<<”In constructor:\n”;
x=100;
}
num::~num()
{
cout<<”In desctructor:\n”;
}
void num::display()
{
cout<<”Value of x=”<<x;
}
void main()
{
num n;
n.display();
getch();
}
15. Mention the types of data files.
Ans: text file and binary file.
16. What are the advantages of ISAM?
Ans: -
permits efficient and economical use of sequential processing techniques when
the activity
ratio is high.
- Permits direct access processing of records in
a relatively efficient way when the activity ratio is low.ratio is high.
17. Differentiate between DROP and DELETE
command.
Ans:
Ans:
DELETE
|
DROP
|
1.
DELETE command is used to delete the content of
the table.
|
1. DROP command is used to delete the entire table
along with the content.
|
2.
Syntax: delete from table_name where
[column_name=value];
|
2. Syntax: DROP TABLE table_name.
|
18. Name the types of viruses.
Ans: - file infectors.
- Boot sector virus.
- Macro virus.
- Network virus.
- Boot sector virus.
- Macro virus.
- Network virus.
Answer any five of
the following.
Each question carries 3 marks. (5 X 3 = 15)
Each question carries 3 marks. (5 X 3 = 15)
19. What is UPS? Explain its types.
Ans: electronic components of a computer system require continuous supply of electric
current for their operations to prevent them from the failures, break down or shutdown.
There are two types of power supply connected to a computer system; they are Switched Mode Power Supply (SMPS) and Uninterruptable Power Supply (UPS)
-SMPS: it converts AC power into DC power. It is a metal box in the rear of the system. It contains the power card plug and a fan for cooling, because it generates a lot of heat. SMPS with a power of 300 watts is needed. It converts 230 volts of AC to 5 to 12 DC volts and the wattage is around 180 to 300 watts, 450 watts and 500 watts.
- UPS: An UPS is a power supply that includes a battery to maintain power in the event of a power failure. An UPS keeps a computer running for several minutes to few hours after a power failure, enabling us to save data the is in RAM and then shut down the computer
Ans: electronic components of a computer system require continuous supply of electric
current for their operations to prevent them from the failures, break down or shutdown.
There are two types of power supply connected to a computer system; they are Switched Mode Power Supply (SMPS) and Uninterruptable Power Supply (UPS)
-SMPS: it converts AC power into DC power. It is a metal box in the rear of the system. It contains the power card plug and a fan for cooling, because it generates a lot of heat. SMPS with a power of 300 watts is needed. It converts 230 volts of AC to 5 to 12 DC volts and the wattage is around 180 to 300 watts, 450 watts and 500 watts.
- UPS: An UPS is a power supply that includes a battery to maintain power in the event of a power failure. An UPS keeps a computer running for several minutes to few hours after a power failure, enabling us to save data the is in RAM and then shut down the computer
There are two types of UPS: Online UPS and standby
UPS
- Online UPS: it provides continuous power to the system from its own inverter when the power goes off. For a PC with color monitor 15”, requires an UPS of 500 VA and for a PC with color monitor 17”, requires an UPS of 600 VA.
- Online UPS: it provides continuous power to the system from its own inverter when the power goes off. For a PC with color monitor 15”, requires an UPS of 500 VA and for a PC with color monitor 17”, requires an UPS of 600 VA.
- Standby UPS or Offline UPS: it 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 which time the
computer is not receiving any power
20. Describe NOR gate with logic diagram and
truth table.
Ans: 21. Write an algorithm to insert an element in an array.
A[I+1]=A[I]
End of for
Step 2:
A[P]=ITEM
Step 3:
N=N+1
Step 4:
exit
22. Explain memory representation of pointers.
Ans: memory is organized as an array of bytes. A byte is basic storage and accessible unit in memory. Each byte is identifiable by a unique number called address. Suppose we have 1 KB of memory, since 1 KB = 1024 bytes, the memory can be viewed as an array of locations of size 1024 with the subscript range (0 to 1023). 0 represents the address of first location; 1 represents the address lf second location; and so on 1023 represents the address of last location.
Consider the
declaration, int num;
This declaration
tells the compiler to reserve a location in memory. We know that the size of
int type is two byte. So the location would be two bytes wide.
In the above
figure, num is the variable that stores the value 15 and address of num is 100.
The address of a variable is also an unsigned integer number. It can also be
retrieved and stored in another variable.
23. Name any three functions belongs to
ofstream class.
Ans:
put(),write(),tellp(),seekp().
24. What is data independence? Write its types.
Ans: it is an ability of a database to modify a schema definition at one level without affecting a schema in the next higher level.
There are two types of data independence,
- Physical data independence
- Logical data independence
Ans: it is an ability of a database to modify a schema definition at one level without affecting a schema in the next higher level.
There are two types of data independence,
- Physical data independence
- Logical data independence
25. List any three technologies and services
used in e-commerce.
Ans: - Digital Cash
- Electronic Fund Transfer (EFT)
- Benefit Fund Transfer (BFT)
Ans: - Digital Cash
- Electronic Fund Transfer (EFT)
- Benefit Fund Transfer (BFT)
26. What is web scripting? Name any two web
scripting languages.
Ans: the process of creating and embedding scripts in a web page is known as web scripting.
Scripting languages are,
VBScript, Javascript, ASP, PHp, PERl, JSP etc.
Ans: the process of creating and embedding scripts in a web page is known as web scripting.
Scripting languages are,
VBScript, Javascript, ASP, PHp, PERl, JSP etc.
Answer any seven of
the following.
Each carries 5 marks. (7 X 5 = 35)
Each carries 5 marks. (7 X 5 = 35)
27. Using K-map, simplify the following
expressions in four variables W,X,Y and Z.
m1,m3,m5,m6,m7,m9,m11,m13.
28. Write an algorithm to demonstrate dequeue.
Ans: Step 1:
if FRONT=NULL then
PRINT “underflow”
Exit
Step
2: ITEM=QUEUE[FRONT]
Step
3: if FRONT=REAR then
FRONT=0
REAR=0
Else
FRONT=FRONT+1
Step 4: return
Step 4: return
29. Demonstrate an algorithm to insert and
delete an element from an array.
Ans: Step 1: item=A[P]
Step 2: for I=Pto N-1
A[I]=A[I+1]
end of for
Step 3: N=N-1
Step 4: exit
30. Write the applications of object orientated
programming.
Ans: Computer graphic applications
- CAD/CAM software
- Object oriented database
- User interface design such as windows
- Real-time systems
- Simulation and modeling
- Artificial intelligence and expert systems
Ans: Computer graphic applications
- CAD/CAM software
- Object oriented database
- User interface design such as windows
- Real-time systems
- Simulation and modeling
- Artificial intelligence and expert systems
31. Describe how to define class with programming example.
Ans: A class definition is a process of
naming a class, data and functions of the class. A class declaration
specifies, representing objects and functions that operate on objects.
The definition and declaration of a class includes the following
- The data members of the class describes the characteristics of the class
- The function members are the set of operations that are performed on the objects of the class.
- The access control specifiers (private, protected and public) to the class members within a program are specified
- Class name is used for external operations for accessing and manipulating the instance of a class
Syntax of a class:
class class_name
{
private: data member;
function member;
protected: data member;
function member;
public: data member;
function member;
};
Example:
class student
{
private: int rollno;
char name[15];
float percentage;
public: void getdata();
void putdata();
};
The definition and declaration of a class includes the following
- The data members of the class describes the characteristics of the class
- The function members are the set of operations that are performed on the objects of the class.
- The access control specifiers (private, protected and public) to the class members within a program are specified
- Class name is used for external operations for accessing and manipulating the instance of a class
Syntax of a class:
class class_name
{
private: data member;
function member;
protected: data member;
function member;
public: data member;
function member;
};
Example:
class student
{
private: int rollno;
char name[15];
float percentage;
public: void getdata();
void putdata();
};
32. Write the features of friend function.
Ans: A friend function has full access right to the private and protected members of the class.
- A friend function cannot be called using the object of that class. It can be invoked like any normal function.
- A friend function can be declared anywhere in the class and it is not affected by access specifiers (private, protected and public)
- They are normal external functions given special access privileges
- The function is declared with keyword friend. But while defining friend function it does not use either friend or :: operator
Ans: A friend function has full access right to the private and protected members of the class.
- A friend function cannot be called using the object of that class. It can be invoked like any normal function.
- A friend function can be declared anywhere in the class and it is not affected by access specifiers (private, protected and public)
- They are normal external functions given special access privileges
- The function is declared with keyword friend. But while defining friend function it does not use either friend or :: operator
33. What is copy constructor? Explain with programming
example.
Ans: The copy constructor is a constructor which creates an object by
initializing it with an object of the same class.
The copy constructor is used to −
- Initialize one object from another of the same type.
- Copy an object to pass it as an argument to a function.
- Copy an object to return it from a function.
x a2=a1;
#include<iostream.h>
#include<conio.h>
class copy
{
int var;
public: copy(int temp)
{
var=temp;
}
int calculate()
{
int fact,i;
fact=1;
for(i=1;i<=var;i++)
fact=fact*i;
retrun fact;
}
}
int calculate()
{
int fact,i;
fact=1;
for(i=1;i<=var;i++)
fact=fact*i;
retrun fact;
}
};
void main()
{
int n;
cout<<”Enter
the number: ”;
cin>>n;
copy obj(n);
copy cpy=obj;
cout<<”Before
copying : ”<<n<<”!=”<<obj.calculate()<<endl;
cout<<”After
copying : ”<<n<<”!=”<<cpy.calculate()<<endl;
}
34. Define inheritance. Explain its any two
types.
Ans: the process of acquiring properties of one class to another is
called inheritance.
- Single inheritance: if a class is derived from a single base class, it is called as single inheritance.
- Multilevel
inheritance: the classes can also be derived from the classes that are
already derived. This type of inheritance is called multilevel inheritance.
35. What is E-R Diagram? Explain its
components.
Ans: ER diagram is a visual representation of data that describes
how data is related to each
other.
1) Entity: An entity may be any object, place, or person. In
E-R diagram an entity is represented using rectangles.
Weak entity: it depends on another entity. It represented as double rectangle
2) Attribute: An attribute describes a property or
characteristic of an entity. For example, name, age, address etc. can
attributes of employee. An attribute is represented using ellipse
3) Relationship: A relationship describes relations between
entities. Relationship is represented using diamonds
36. Explain SQL constraints with an example.
Ans: Constraints are the
rules enforced on data columns on table. These are used to limit the type of
data that can go into a table. Following are the constraints available in SQL:
- Primary key: this constraints defines a column or combination of columns which uniquely identifies each row in the table.
Ex: create table student(rollno number(2) PRIMARY KEY, name varchar(15));
- Foreign key: this constraints identifies any column referring the PRIMARY KEY in another table. It establishes a relationship between two columns in the same table or between different tables.
Ex: SQL> create table grade(rollno number(2), grade char(1), foreign key(rollno) references student(rollno));
- Not null constraint: this constraints ensures all rows in the table contain a definite value for the column which is specified as not null. Which means a null value is not allowed
Ex: create table student(rollno number(2) NOT NULL, name varchar(15));
- Unique key: this constraint ensures that a column or a group of columns in each row have a distinct value. A column(s) can have a null value but the values cannot be duplicated
Ex: create table student(rollno number(2) PRIMARY KEY, name varchar(15) UNIQUE);
- Check constraint: The CHECK constraint is used to limit the value range that can be placed in a column.
Ex: create table student(rollno number(2), marks number(3) check(marks>=0 and marks<=100));
- Primary key: this constraints defines a column or combination of columns which uniquely identifies each row in the table.
Ex: create table student(rollno number(2) PRIMARY KEY, name varchar(15));
- Foreign key: this constraints identifies any column referring the PRIMARY KEY in another table. It establishes a relationship between two columns in the same table or between different tables.
Ex: SQL> create table grade(rollno number(2), grade char(1), foreign key(rollno) references student(rollno));
- Not null constraint: this constraints ensures all rows in the table contain a definite value for the column which is specified as not null. Which means a null value is not allowed
Ex: create table student(rollno number(2) NOT NULL, name varchar(15));
- Unique key: this constraint ensures that a column or a group of columns in each row have a distinct value. A column(s) can have a null value but the values cannot be duplicated
Ex: create table student(rollno number(2) PRIMARY KEY, name varchar(15) UNIQUE);
- Check constraint: The CHECK constraint is used to limit the value range that can be placed in a column.
Ex: create table student(rollno number(2), marks number(3) check(marks>=0 and marks<=100));
37. Explain protection methods of network
security.
- Authorization: Authorization is the process of allowing an
authenticated users to access the resources by checking whether the user has
access rights to the system. Authorization helps you to control access rights
by granting or denying specific permissions to an authenticated user.
- Authentication:
Authentication is the process of verifying the identity of a user by obtaining
some sort of credentials and using those credentials to verify the user's
identity. If the credentials are valid, the authorization process starts.
Authentication process always proceeds to Authorization process.
- Encrypted smart cards: Confidentiality is the use of encryption to protect information from unauthorized disclosure. Plain text is turned into cipher text via an algorithm, then decrypted back into plain text using the same method.
Cryptography is the method of converting data from a human readable form to a modified form, and then back to its original readable form, to make unauthorized access difficult.
- Biometric systems: it involves unique aspects of a person’s body such as finger prints, retinal patterns, etc to establish his/her identity.
- Encrypted smart cards: Confidentiality is the use of encryption to protect information from unauthorized disclosure. Plain text is turned into cipher text via an algorithm, then decrypted back into plain text using the same method.
Cryptography is the method of converting data from a human readable form to a modified form, and then back to its original readable form, to make unauthorized access difficult.
- Biometric systems: it involves unique aspects of a person’s body such as finger prints, retinal patterns, etc to establish his/her identity.
- Firewall: A firewall is a network security system designed to prevent unauthorized access to or from a private network. Firewalls can be implemented in both hardware and software, or a combination of both. Network firewalls are frequently used to prevent unauthorized Internet users from accessing private networks connected to the Internet, especially intranets. All messages entering or leaving the intranet pass through the firewall, which examines each message and blocks those that do not meet the specified security criteria.
2nd puc computer science model 3 question papers and answers
Reviewed by Vision Academy
on
January 14, 2020
Rating:

No comments: