0% found this document useful (0 votes)
134 views15 pages

II PU Computer Science

The document contains a model question paper with two parts - Part A and Part B. Part A contains 10 multiple choice questions related to computer fundamentals like defining CPU clock speed, symbols for logic gates, data structures, scope resolution operator, differences between statements, attributes of a table, expansions of acronyms and network components. Part B contains mathematical logic questions related to proving algebraic expressions for logic gates and constructing Boolean functions.

Uploaded by

Raghu Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views15 pages

II PU Computer Science

The document contains a model question paper with two parts - Part A and Part B. Part A contains 10 multiple choice questions related to computer fundamentals like defining CPU clock speed, symbols for logic gates, data structures, scope resolution operator, differences between statements, attributes of a table, expansions of acronyms and network components. Part B contains mathematical logic questions related to proving algebraic expressions for logic gates and constructing Boolean functions.

Uploaded by

Raghu Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

MODEL PAPER -1

PART-A
1.Expand PCI?
Pheripheral component interconnect

2.What do you understand by the truth function?


A truth function is a function formed using set of truth values.

3.Define an array?
An array is a linear data structure contain homogeneous data elements with a common name.

4.What are data members?


The data members are the variables which can hold the data depending on access control specifier different
functions can use them.

5.What is dynamic memory?


Allocating the memory at run time is called dynamic memory allocation.

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

9.What is open source software?


The open source is a software distributed with the source code that anybody can study,modify for their own
needs and redistribute without any capital.

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.

12.State idempotence law.


x+x=x and x.x=x

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.

14.Why are constructors needed in a program?justify.


Constructors are helpful to initialize the objects as they get created .
Class getval
{
int x,y;
public:
getval();
getval(int a,int b);
};
Ex:
Getval()
{
}
Getval::getval(int a, int b)
{
x=a;
y=b;
}

15.Differentiate between read() and write()


Read() is used to read the binary file
Syntax: ifstream_object.read((char *)&variable,sizeof(variable));
Write()is used to write the data into binary file
Syntax:ofstream_object.write((char *))&variable,sizeof(variable));

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.

17.Explain the working of NAND gate?


It reverses the output of AND gate as given below
Output is FALSE,when all Inputs are TRUE
Output is TRUE,when any one Input is FALSE

18.Mention the various operations performed on data structures.


Travesing ,insertion,deletion,searching

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.

22.Explain friend functions and their characteristics?


i) A friend of the class can be member of some other class.
ii) A friend of one class can be friend of another class or all the classes in one program, such a friend is known
as global friend.
iii)A friend can access the private or protected members of the class in which they are declared to be friend but
they can use the members for a specific object.
iv)The friends are non members hence do not get this pointer.
v)The friends can be friend of more than one class hence they can be used for message passing between the
classes.

23.Write the rules for writing a constructors function?


i)The constructor must have the same name as that of the class name thus a compiler identifies that as a
constructor function.

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.

24.What are the advantages of inheritance?


i)code reuseability
ii)testing and debugging is easy
iii)coding is easy because similar types of codes and logics are used in inherited classes
iv)objects can be represented in different levels that is hierarchical arrangements of objects
v)efficient memory utilization
vi)faster development of codes and easy to extend
vii)easy maintenance etc

25. Explain data processing cycle?


i)Data collection-The required data may exist in different places and in different forms.All required data items
must be gathered together as first step.
ii)Data input-The mechanism of providing the data into a data processing system.
iii)Data process-It is depending on what kind of information need to be generated.It uses many functions for
successful for data processing.Those functions are
classification,sorting,verification,calculation,summarization,generating the reports etc.
iv)Data output-After the successful data processing activity,results are generated.It is important to check the
result whether it is according to the requirement or not.
v)Data storage-The result must be stored in the secondary storage medium for future use.
vi)Maintenance-Depending on significance of information it has to be maintained with possible securities.

26.Write an algorithm to delete an element in an array.


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

27. What is gateway? Explain?


A gateway is a device that connects dissimilar networks. A gateway operates at the highest layer of the network
abstraction. It expands the functionality of routers by performing data translation and protocol conversion. It
needs to convert Ethernet traffic from the LAN, to SNA(systems network architecture) traffic on a legacy system.
It then routes the SNA traffic to the mainframe. when the mainframe answers the reverse process occurs. In
enterprises the gateway is the computer that routes the traffic from a workstation to the outside network that is
serving the webpages .In homes the gateway is the ISP that connects the user to the internet.

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.

2. Write the standard symbol for NOR Gate.


Ans:

3. What is a binary tree?


Ans: A binary tree is a tree in which each node has at most two descendants (nodes).

4. What is the significance of scope resolution operator?


Ans: Scope resolution operator identifies the function as a member of a particular class.

5. Write the difference between the statements:


i. X=&Y ii. X=*Y
Ans: x=&x here the address of variable y is assigned to printer variable.
X=*y the value of variable Y is assigned to X.

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

9. What is hub in network?


Ans: A hub is a hardware device used to connect several computers together.

10. What are hackers?


Ans: Hackers are interested in gaining knowledge about computer system and using the knowledge for playing
pranks.

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.

14. What is a constructor? Give an example.


Ans: It is a special member functiothat is used in a classes to initialize the object of the class automatically.
The constructor is a member function of a class with the same name as that of the class. The constructor is
invoked when we create the object of the class.
Example: class sample
{ int s;
Public: sample()
{
S=10
}
};

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


Ans: This member function belongs to class ifstream and is used to read binary data from a file.
Syntax: ifstream_object.read((char *) &variable, sizeof(variable));
The write() member function belongs to the class ofstream and which is used to binary data file.

16. What is data warehouse?


Ans: Data warehouse is a structured repository of historic data.
Data ware house are designed to facilitate reporting and supporting data analysis.

17. What is dual table?


Ans: To use all single row function we have to use the dummy table DUAL provided by oracle.

18. What is GPRS technology?


Ans: GPRS (General Packet Radio Service) is used for wireless communication using mobile device. GPRS is
used for wireless communication using mobile device. With this service you can access the interet, send mails
and large data, download games and watch movies.

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.

20. What is principle of duality? Give an example.


Ans: Duality theorem states that starting with a Boolean relation, another relation can be derived by a.
Changing each OR sign to AND sign, b. Changing each And to OR sign ,C. Changing 0’s to 1’s and 1’s to 0

21. Write an algorithm for traversal in a linear array.


Ans: 1. For Loc= lb to ub
Process a[loc]
Endfor
2 exit

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.

23. Explain relational data model.


Ans: A relation is used to get information about any entity and its relationship with other entities in the form of
attributes and tuple. The relational model was developed by E.F.codd in 1970. In the relational data model,
unlike the hierarchical and network models.

24. Explain different types of transmission media used in computer network.


Ans: 1. Wired or guided media 2. Wireless or unguided media.
In wired it uses cables that have physical existence and are limited by the physical geography. Popular bound
transmission media in use are twisted pair cable, co-axial cable and fiber optical cable.
Wireless transmission media are the ways of transmitting data without using any cables. These media are not
bouded by physical geography. This transmission uses Microwave, Radio wave etc.

25. What is use of PHP files?


Ans: a. Password protection
b. Browser customization
c. Form processing
d. dynamically editing or adding content to web page.
e. Building and displaying pages created from a database.

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.

(Please refer text book or notes given in the class)

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

28.Write the advantages of OOPs.


1)The programs are modularized based on the principle of classes and objects.
2)Linking Code and object allows related objects to share common code. This reduces
code duplication and code reusability.
3)Data is encapsulated along with functions. Therefore external member function cannot access
or modify data. Thus providing data security.
4)Easier to develop complex software. Because complexity can be minimized through
inheritance.
5)The concept of data abstraction separated object specification and object implementation.

29.Describe how objects can be used as function arguments.


A function can receive an object as a function argument. This is similar to any other data type being sent as
function argument. An object can be passed to a function in two ways:
(i) Copy of entire object is passed to function. (Pass by value)
(ii) Only address of the object is transferred to the function. (Pass by reference)
In Pass by Value- a copy of the object is passed to the function. The function creates its own copy of the object
and uses it. Therefore 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 directly 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 require only to pass the address of the object and not the entire
object.

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();
};

32. Explain network security in detail.


Network security makes sure that only legal authorized user and program gain access to information resources
like databases. Also certain control mechanisms are setup that properly authenticated users to get access only
to those resources that they are centralized to use. Under this type of security mechanisms like authorization,
authentication, encrypts, smart card, biometrics and firewalls etc. are implemented.
The problem encountered under network security can be summarizes as follows.
a)Physical security holes- when individuals gain unauthorized physical access to a computer and temper with
the files. Hackers do it guessing passwords of various users and then gaining access to the network system.
b)software security holes when badly written program.
c)Inconsistent usage holes. When a system administrator assembles a combination of a hardware and software
such that the system is seriously flawed from security point of view.

9
MODEL QUESTION PAPER-3

SUBJECT: COMPUTER SCIENCE

TIME: 3 Hours 15 mins Max Marks: 70

PART A

I. Answer all questions. Each question carries one mark 10 X 1=10

1. Expand FLOSS
Free Libre Open Source Software

2. What is meant by plug and play device?


Plug and play devices can connect directly to computer and work without using adapter card

3. Define binary tree


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

4. How do you declare a pointer?


Data type *variable name;

5. What is the use of scope resolution operator


Scope resolution operator identifies the function as an member of particular class

6. Define clock speed of a CPU


Clock speed of a computer is defined as the frequency with which a processor executes instructions

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

9. What is meant by universal gates?


Universal gate is a gate using which all the basic gates can be designed

10. Which tag is used to insert image in HTML


<img> tag
10
PART B

II. Answer any five questions. Each question carries two marks 5 X 2=10

11. Mention any two applications of OOP


a. Computer graphics applications
b. Real Time Systems
c.
12. Differentiate between read() and write()
The read () member function belongs ifstream class and used to read binary data and write () member
function belongs to ofstream class and used to write binary data

13. Mention different types of inheritance


a) Single inheritance
b) Multiple inheritance
c) Multi level inheritance
d) Hierarchical inheritance
e)
14. Give any 2 applications of Stack
a. Expression Evaluation b. Language Processing

15. What is generalization and specialization


Generalization is a bottom up approach where two lower level entities combine to form higher level
entity and Specialization is a top-down approach in which one higher level entity is broken down into
lower level entities

PART C
III. Answer any 5 questions. Each question carries three marks 5 X3=15

16. 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 is expensive
Computers have cache memory of size 256KB and 2 MB

17. Explain type of E-commerce applications


1. Business –to-Business(B2B) : Exchange of service or information or product from one business to
another business
2. Business-to-Consumer(B2C) : Exchange of service or information or product from business to
consumer
3. Consumer-to-Business(C2B) : Consumer directly contacts the business vendors by presenting their
work online
4. Consumer-to Consumer(C2C) :Online business transactions done between two consumers
11
18. List different modes of opening a file
1) ios::app mode is used to append the file
2) ios::in mode is used to open the file for reading only
3) ios::out mode is used to open the file for writing

19. Explain any three types of I/O ports


1. Serial port : They are used to connect communication devices like mouse and modem.port transfer
data serially one bit at a time
2. Parallel port: Parallel ports are used to connect external input /output devices like printers
And scanners. These port transfers 8 bit at a time
3. IDE port: IDE devices like CD-ROM or hard disk drives are connected to motherboard through IDE
port

20. Explain new operator with syntax and example


The dynamic memory is allocated using new operator.
Syntax: Pointer = new type[size];
Eg: int *ptr;
ptr = new int[5];

PART D

IV. Answer any seven questions. Each question carries five marks 7 X 5=35

21. Explain memory representation of queues using one dimensional array


Queue is represented in memory as a linear array. Two pointer variables FRONT and REAR are
maintained .The pointer variable FRONT contains location of the element to be removed and pointer
Variable REAR contains location of the last element to be inserted. The condition FRONT=NULL
indicates that queue is empty and condition REAR=N indicates that the queue is full.

FRONT REAR

A B C
0 1 2 3

22. Explain characteristics of friend function


A friend function is a non member function that is friend of a class
A friend function although not a member function, has full access rights to private and protected
members of a class

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

23. Give algorithm for PUSH and POP operations of a stack


Algorithm for PUSH Operation
STEP1: IF (TOP = N-1) THEN
PRINT “STACK IS FULL”
END IF
STEP 2: TOP TOP+1
STEP 3: STACK[TOP]=ITEM
STEP 4: RETURN
Algorithm for POP Operation
STEP1: IF (TOP = -1) THEN
PRINT “STACK IS EMPTY”
END IF

STEP 2: ITEM = STACK [TOP]


STEP 3: TOP TOP-1

STEP 4: RETURN

24. Write rules for writing constructor function


Constructor always has the name that is same as class name
A constructor does not have return type
They are invoked automatically when objects are created
A class can have more than one constructor but it should have different formal parameter
Constructor should always be defined in public section

25. Write algorithm to perform enqueue and dequeue operations on a queue

Algorithm for ENQUEUE Operation


STEP1: IF REAR=N THEN
PRINT “QUEUE IS FULL”
END IF
STEP 2: IF FRONT=NULL THEN
FRONT=0
REAR=0
ELSE
REAR=REAR+1
STEP 3: QUEUE [REAR] =ITEM
STEP 4: RETURN
Algorithm for DEQUEUE Operation

13
STEP1: IF FRONT=NULL THEN
PRINT QUEUE IS EMPTY”
END IF

STEP 2: ITEM = QUEUE [FRONT]


STEP 3: IF FRONT=REAR THEN [IF QUEUE HAS ONLY ONE ELEMENT]
FRONT=REAR=0
ELSE
FRONT=FRONT+1
STEP 4: RETURN

26. Explain network security in detail


Network security is the process of providing security to the networking devices and the data stored over
a network. There are different methods of protection
1) Authorization : It determines whether the service provider has granted access for the web service to
the user
2) Authentication: Authentication is password protection where user is asked to enter a valid password
to use the service
3) Encrypted smart card: An encrypted smart card is an hand held smartcard that can generate a token
that computer can recognize. Different tokens are generated each time so that even if earlier token is
hacked it is of no use
4) Biometric System: The biometric system involve some unique aspects of a person’s body such as
figure prints, retinal patterns etc to establish his or her identity
5) Firewall: Firewall is a software to prevent unauthorized access to or from a private network

27. Explain different types of defining function of a class


Method 1: Defining function inside the class
Method2: Defining function outside the class
class student
{
private:
int regno;
char name[20];
public:
void getdata() //Function definition inside the class
{
cout<<endl<<”Enter the regno and name”;
cin>>regno>>name;
}
};

14
void student::putdata() //Function definition outside class using scope resolution operator
{
cout<<endl<<”Regno =”<<regno;
cout<<endl<<”Name=”<<name;
}

15

You might also like