II PU Computer Science
II PU Computer Science
PART-A
1.Expand PCI?
Pheripheral component interconnect
3.Define an array?
An array is a linear data structure contain homogeneous data elements with a common name.
6.What is an entity?
A real world object is called entity.
7.What is server?
It is high speed computer system where data and applications are stored in a network.
8.Expand 2G?
Second generation
10.What is DHTML?
Dynamic hyper text markup language is an extention of html that enables a webpage tp response an user input
without sending requests to the web server.
PART B
11.What is meant by universal gate?
A gate which is used to design all types of logic circuits is called universal gates.
1
13.What is the difference between program module and an object?
A module is a subproblem or a function.the modular programming model permits the easy extension of
functions on non-extensible recursive datatypes.the object model of programming defines a set of recursive
datatypes using classes.
PART C
16.Give the features of USB port?
It is a plug and play port.
Upto 127 devices can be connected to the computer system either directly or by way of USB hubs,
It can also be used for power transmission.
2
19.Explain database users?
The different DBMS users are
1.Database administrator(DBA)-A super user who creates ,alters and uses the database.
2.Database degsigner-As per the layout by the DBA database designer group design the database schema by
applying the constraints and specification of data storage.
3.Application programmer-In an organisation user interacts with the database through an application software.
20.What is telnet?
telnet is a network protocol used on the internet or local area networks to provide a bidirectional interactive
text oriented communication facility using a virtual terminal connection.
PART D
21.Write the difference between procedural programming and object oriented programming?
There is no rule that one should use a particular method to develop a program. Its upto the discretion of the
programmer. The major differences are listed below:
In POP, program divided into smaller parts called functions.
In OOP, program is divided into parts called objects.
In POP, importance is not given to data but to functions as well as sequence of actions to be done.
In OOP, importance is given to the data rather than procedures or functions because it works as a real world
approach.
POP follows top down approach.
OOP follows bottom up approach.
POP does not have any access specifier.
OOP has access specifiers namely public, private and protected.
POP does not have any proper way for hiding data so it is less secure.
OOP provides data hiding so provides more security.
In POP, overloading is not possible.
In OOP, overloading is possible in the form of function overloading and operator overloading.
3
ii)There is no return type for a constructor because a constructor is designed for the purpose of initialization of
objects and it does not return any value to any function.
iii)A constructor should be defined under public specifier.
iv)A constructor can have default arguments.
4
MODEL QUESTION PAPER 2
PART A
1. Define the clock speed of the CPU
Ans: The clock speed of a CPU is defined as the frequency with which a processor executes instructions or the
data is processed.
6. What is an attribute?
Ans: each column of a table is identified with distinct header called attribute
.
7. Expand SLIP?
Ans: Serial line internet protocol
8. Expand SIM.
Ans: Subscriber Identity Module
PART B
11. Prove algebraically that (X+Y+Z)(X’+Y+Z)=Y+Z
Ans: (X+Y+Z).(X’+Y+Z)
=XX’+XY+XZ+YX’+YY+YZ+ZX’+ZY+ZZ
=0+XY+XZ+YX’+Y+YZ+X’Z+YZ+Z
=Y+XY+YZ+XZ+X’Z+Z
=Y(1+X+Z)+ Z(X+X’+1)
=Y+Z
5
12. Construct a Boolean function of 3 variables X,Y and Z, that has an output 1 when exactly two of X,Y and Z
are having 0 in all other cases.
X Y Z F
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 0
13. Mention any 2 advantages of Object Oriented Programming over earlier programming methods.
Ans: a. OOP can communicate through message passing which makes interface description with outside system
very simple.
b. The concept of data abstraction separates object specification and object implementation.
c. Creation and implementation of OOP code is easy.
6
PART C
19. Explain cache memory.
Ans: The cache memory is a high speed memory inside CPU to speed up access of data and instructions
stored in RAM memory. Cache memory is expensive. Computers have cache memory of size 256KB and 2MB.
22. Explain the use of new operator and delete operator with its syntax and give example.
Ans: new operator is used to allocate memory dynamically to objects.
PART D
26.Given the Boolean function f(W,X,Y,Z)=π(5,6,7,8,9,12,13,14,15). Use k map to reduce the function of using
POS form.
7
27. Write an algorithm for binary search method.
Let A is the sorted array with LB as lower bound and UB as the upper bound respectively. Let B, E, M denote
beginning, end and middle locations of the segments of A.
Step1: set B=LB, E=UB
Step 2: while(B<=E)
M=int(B+E)/2
If(ELE=A[M]
Loc=M
Goto 4
Else
If(ELE<A[M])
B=M-1
Else
E=M+1
End of while
Step 3: if (loc>=0)
Print loc
Else
Print “Search is unsuccessful”
Step 4: exit
30. Write a C++ program to insert an element into an array at a given position.
Let A is the array with N elements. ITEM is the element to be inserted in the position P.
Step 1: for i=N-1 down to P
A[i+1]=A[i]
8
End of for
Step 2: A[P]=ITEM
Step 3: N=N+1
Step 4: exit
31. Explain destructor with syntax and example.
The destructor will be called automatically when an object is destroyed. It is used to destroy the objects that
have been created by a constructor. Like a constructor, the destructor is a member function whose name is the
same as the class name but is preceded by a tilde (~). A destructor never takes any argument nor does it return
any value. It will be invoked implicitly by the compiler upon exit from the program to clean up storage that is no
longer accessible. It is a good practice to declare destructors is a program since it releases memory space for
future use.
Syntax:
class classname
{ private: //data variables
public:
classname();
~classname();
};
Example
class account
{ floatbalance,rate;
public: accoubnt();
~account();
};
9
MODEL QUESTION PAPER-3
PART A
1. Expand FLOSS
Free Libre Open Source Software
7. What is an object?
Object is an instance of a class
8. What is web-scripting?
The process of creating and embedding scripts in a web page is known as web scripting
II. Answer any five questions. Each question carries two marks 5 X 2=10
PART C
III. Answer any 5 questions. Each question carries three marks 5 X3=15
PART D
IV. Answer any seven questions. Each question carries five marks 7 X 5=35
FRONT REAR
A B C
0 1 2 3
12
Friend functions cannot be called using objects of that class
Friend function is declared by the class that is granting access
They are declared using keyword friend but does not use the keyword for definition
STEP 4: RETURN
13
STEP1: IF FRONT=NULL THEN
PRINT QUEUE IS EMPTY”
END IF
14
void student::putdata() //Function definition outside class using scope resolution operator
{
cout<<endl<<”Regno =”<<regno;
cout<<endl<<”Name=”<<name;
}
15