2nd PUC Computer Science Model Question Paper 4 with Answers

Students can Download 2nd PUC Computer Science Model Question Paper 4 with Answers, Karnataka 2nd PUC Computer Science Model Question Paper with Answers helps you to revise the complete Karnataka State Board Syllabus and to clear all their doubts, score well in final exams.

Karnataka 2nd PUC Computer Science Model Question Paper 4 with Answers

Time : 3 Hrs. 15 Mins.
Max. Marks : 70

Section – A

I. Answer the following questions in a sentence each: (10 × 1 = 10)

Question 1.
Which memory is considered as working memory of CPU?
Answer:
RAM (Random Access Memory).

2nd PUC Computer Science Model Question Paper 4 with Answers

Question 2.
Write the standard symbol for NAND gate.
Answer:
2nd PUC Computer Science Model Question Paper 4 with Answers 1

Question 3.
Define Data structure.
Answer:
Data structure means organization or structuring a collection of data items in appropriate form so as to improve the efficiency of storage of processing.

Question 4.
What is another name of Boolean Algebra?
Answer:
Switching Algebra.

Question 5.
What is an object?
Answer:
Real world entity with attributes & functions.

Question 6.
What is a member function?
Answer:
Set of operations that are performed on the objects of the class.

Question 7.
What is an Entity?
Answer:
An Entity is an object such as table or form an Entity Relationship is how each table link to each other.

Question 8.
Expand DDL.
Answer:
DDL – Data Definition Language

2nd PUC Computer Science Model Question Paper 4 with Answers

Question 9.
What is a virus?
Answer:
Computer virus is a malicious program that requires a host & is designed to make a system sick.

Question 10.
What is free software?
Answer:
Free software means the software is freely accessible and can be freely used, changed, improved, copied and distributed by all who wish to do so and no payments are needed to be made for free software.

Section – B

II. Answer five questions. Each question carries two marks (5 × 2 = 10)

Question 11.
State Distributed law & prove using turth table.
Answer:
Statement: Distributive law states that, x(y + z) = xy + xz & x + yz = (x + y) (x +z).
Proof:
consider x ( y + z ) = xy + xz
2nd PUC Computer Science Model Question Paper 4 with Answers 2
Both column
x (y+z) & xy + xz are identical. Hence proved.

Question 12.
A truth table has output 1 for each of these inputs. ABCD = 0011, ABCD = 0101, ABCD = 1000, what are the fundamental products and write minterm expression.
Answer:
Fundamental products are
2nd PUC Computer Science Model Question Paper 4 with Answers 3

Question 13.
What is the difference between program module & on object?
Answer:
A program Module is a self – contained independent program segment only it does not provide security to data where as an object is a collection of data members and member functions that operate on data and data is provided with security.

Question 14.
What is stream? Name the stream generally used for file I/O.
Answer:
Streams refers to a sequence of bytes. Fstram.

2nd PUC Computer Science Model Question Paper 4 with Answers

Question 15.
What is a key? Mention any two types of keys.
Answer:
The key is a set of one more columns whose combined values are unique among all occurrence in a given table. Types of key are:

  1. Candidate key (ck)
  2. Primary key (pk)

Question 16.
Write the syntax and example for default constructors.
Answer:
Syntax : class – name :: class – name (int = 0) | | constructure.
Ex : Students () {}.

Question 17.
Classify various SQL operators.
Answer:
Different SQL operators are:

  1. Arithmetic operator
  2. Comparison operator
  3. Logical operator
  4. Operators used to eguate conditions.

Question 18.
What is virus? Mention types of viruses.
Answer:
Computer virus is a malicious program that requires a host and it designed to make a system sick, just like a real virus. Types of, viruses are:

  1. File Infectors
  2. Boot sector viruses
  3. Macro viruses
  4. Network viruses.

Section – C

III. Answer any the questions. Each questions carries 3 marks (5 × 3 = 15)

Question 19.
Explain different characteristics of mother board.
Answer:
The characterisitics of motherboard are:
1. Form factors:
Refers to the motherboard’s geometry, dimensions, arrangement and electrical requirements, different standards have been developed to build motherboards, which can be used in different brands. Advanced Technology Extended. (ATX) is the most common design of motherboard for desktop computers.

2. Chipset:
Controls the majority of resources of the computer. The function of chipset integrated into the motherboard, which includes a recent chipset, in order to maximize the computer’s upgradeability.

3. The process or socket may be a regular connector into which the processor is mounted vertically or a square shaped connector with many small connectors into .which the processor is directly inserted.

Question 20.
Explain the working of NOR gate, (write the O/P conditions)
Answer:
AND gate rule

  • 0 . 0 = o
  • 0 . 1 = 0
  • 1 . 0 = 0
  • 1 . 1 = 1

2nd PUC Computer Science Model Question Paper 4 with Answers

Question 21.
What is an array? Metion different types of arrays.
Answer:
An array is a collection of homogeneous elements with unique name & the elements are arranged in adjacent memory location. Types of arrays are:

  1. One dimensional array
  2. Two dimensional array
  3. Multi dimensional array.

Question 22.
What is New operator in C++? Give example.
Answer:
We can allocate storage for a variable while program is running by using new operator. Dynamic allocation is perhaps the key to pointers. It is used to allocate memory without having to define variable & then make pointers point to them.

Question 23.
Mention the types of file. Explain any one.
Answer:
Binary file & text files:
Text file is a file that stores information in ASCLL characters. In the text files. Each line of text is terminated with the special character known as EOL (End-of-Line) character & delimiter character, when this EOL character is read or written, certain internal translations take splace.

Question 24.
Give the different notations for ER – diagram.
Answer:
Entity:
An entity is represented using rectangles. Double rectangle represents weak entity.
In E – R diagram
2nd PUC Computer Science Model Question Paper 4 with Answers 4
An attribute is represented using eclipse.
2nd PUC Computer Science Model Question Paper 4 with Answers 5
Composite attribute example
2nd PUC Computer Science Model Question Paper 4 with Answers 6
Relationship is represented using diamonds.

Question 25.
How E-Commerce works?
Answer:
Step 1: The merchant submits a credit card transaction to the NMAPAY payment geteway on behalf of a customer via secure web site connection, retail, retail store, MOTO center or wireless device.

Step 2: NMAPAY receives the secure transaction information and passes it via a secure connection to the merchant Bank’s processor.

Step 3 : National merchants Association submits the transaction to the credit card Network (a system of financial entities that communicate to manage the processing, clearing, and setlement of credit card transactions)

Step 4 : The credit card Network routes the transaction to the customer’s credit card Issuing Bank.

Step 5: The customer’s credit card Issuing Bank approves or declines the transaction based on the customer’s available funds and passes the transaction results -back to the credit card Network.

Step 6: The credit card Network realys the transaction reseelts to national Merchants association.

Step 7: National merchants Association relays the transaction results through NMAPAY (website).

Step 8: NMAPAY stores the transaction results and sends them to the customer and to the merchant. This step completes the authorization process-all in about three second or less!

Step 9: National merchants Association sends the appropriate funds for the transactions to the credit card Network, which passes the funds to the Merchants Bank. The bank then deposits the funds into the merchant’s bank account. This step is known as settlement process and typically the transaction funds are deposited into your primary bank account within 24 to 48 hours.

2nd PUC Computer Science Model Question Paper 4 with Answers

Question 26.
Define web hosting. What are the types of web hosting services available.
Answer:
Web hosting is a means of hosting web – server application on a computer system through which electronic content on the Internet is readily available to any web – browser client. Various types of web hosting services are available.

  1. Free hosting
  2. Virtual or shared Hosting
  3. Dedicated hosting
  4. Collection hosting

Section – D

IV. Answer any Seven questions. Each question carries 5 marks (7 × 5 = 35)

Question 27.
Given the Boolean function.
F (A, B, C, D) = (0, 2, 4, 6, 8, 10, 14). Use Karnaugh map to reduce the function F using P – O – S form write a logic gate diagram for the reduced P – O – S expression.
Answer:
Given
F (A, B, C, D) = (0, 2, 4, 6, 8, 10, 14)
K – map using P – O – S form
2nd PUC Computer Science Model Question Paper 4 with Answers 7
P-O-S expression F(A, B, C, D) = \(\mathrm{B}+\mathrm{D} \cdot \overline{\mathrm{C}}+\mathrm{D} \cdot \mathrm{A}+\mathrm{D}\)
Logic Gate Diagram:
2nd PUC Computer Science Model Question Paper 4 with Answers 8

Question 28.
Write an algorithm to insert an element in an array.
Answer:
A is array with N elements. ITEM is the elements to be inserted in the position p.
Step 1 : for I = N,-1 down to P
A [I + 1] = A [I]
End of for
Step 2 : A[P] = ITEM
Step 3 : N = N + 1
Step 4 : Exit

Question 29.
Apply binary search for the following sequence of numbers 10, 20, 30, 35, 40, 45, 50, 55, , 60 search for item = 35.
Answer:

0 1 2 3 4 5 6 7 8
10 20 30 35 40 45 50 55 60

Given n = 9, item = 35.
Let LOC = -1, Beg = 0, End = 8 (n-1)
(I) Mid = \(\frac{0+8}{2}\) = 4
a [ Mid] = a [4] = 40
= 35 ≠ a [Mid]
= 35 ≠ 40
= 35 < 40 = End = Mid – 1 = 4 -1 = 3

(II) Mid = \(\frac{0+3}{2}\) = 1
a [1] = 20
= 35 ≠ 20
= 35 > 20
= Big = Mid + 1 = 1 + 1 = 2

(III) Mid = \(\frac{2+3}{2}\) = 2
a [2] = 30
= 35 ≠ 30
= 35 > 20
= Big = Mid + 1 = 2 + 1 = 3

(IV) Mid = \(\frac{3+3}{2}\) = 3
a [3] = 35
= LOC = Mid
= LOC = 3
35 bound in location 3

2nd PUC Computer Science Model Question Paper 4 with Answers

Question 30.
Explain inline function with syntax & example.
Answer:
A short function consists of function call along with function code & the process is known as expansion.

  1. Inline function definition starts with the keyword, inline.
  2. The inline functions should be defined before all that calls it.
  3. The compiler replaces the function call statement with the function code itself (expansion) then compiles the entire code.
  4. They run little faster then the normal function calling overheads are saved.

Example:

#include
inline int square (int a)
{
return (a × a) ;
}
int main ()
{
int x, y;
x = square (5);
Cout << " square of 5 = "<< x << endl;
y = square 110);
Cout << " square of 10 = " << v << endl;
return 0 ;
}

Question 31.
Describe how objects can be used as function arguments.
Answer:
Objects as function arguments:
A function can receive an object as a function arguemeni. This is similar to any other data type being seat as function arguement. An object can be passed to a function in two way

  1. Copy of entire object is passed to function (pass – by – pass value)
  2. 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, 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 to pass the address of the object and not the entire object.
Example: Program to show objects as arguments to function.
2nd PUC Computer Science Model Question Paper 4 with Answers 9
}
5 Rupees and 75 paise converted value: 575 paise

Question 32.
Explain the features of copy constructor.
Answer:
1. Copy constructors is not invoked explicitly.

2. Copy constructor is invoked automatically when a new object is created & equated to an already existing object in the declaration statement itself.
ex: a a1 ; | | Default constructor
x a2 ; | | Copy constructor
a1, display () ;
The above example shows the use of copy constructor to create a new object a2 using existing object a1.

3. When a new object is declared & existing object is passed instructor is invoked,
ex: x a1 (100, 200) ; | | parameterized constructor
x a2 (a) ; | | copy constructor is invoked for
| | object a2 with a1 as a parameter

4. When an object is passed to a function using pass – by value, copy constructor is automatically called.
ex: void test (x b)
{

}
main ()
{
x a ;
test (a) ; | | copy constructor is invoked.

5. Copy constructor is invoked when as object returns a value.

2nd PUC Computer Science Model Question Paper 4 with Answers

Question 33.
What is virtual base class? Give example.
Answer:
When two or more objects are derived from a common base class, we can prevent multiple copied from the base class being present in an object by declaring the base class as virtual when it is being inherited. Such a base class is known as virtual base class.
ex:

class A
{
_______
_______
}
Class B : virtual public A
{
_______
_______
};
Class C : virtual public A
{
_______
_______
};
Class D : public B, public C
{
_______
_______
};

Question 34.
Explain database model?
Answer:
A database model or simply a data model is an abstract model that describes how the data is represented & used. A data model consists of a set model of a set of data structures & conceptual fools that is used to describe the structure (data types, relationship, & constrains) of a database. Also defines a set of operations that can be performed & on the data.

A data model generally consists of data model theory, which is a formal description of how data may be structured & used, and data model instance which is a parctical data model designed for a particular application. The process of applying a data model theory to create a data model instance is knwon as data modelling.

A database model provides the necessary means to active data abstraction. A Database model define the logical design of data. The model describes the relationship between different parts of the data.

Question 35.
Explain SQL constraints with example.
Answer:
Constraints are the jules enforced on data columms on table. These are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the data base. The constraints available in SQL are Foreign key, Not null, unique Check contraints can be defined in to ways.

  1. The contraints can be specified immediately after the colum definition. This is called a column-level definition.
  2. This contraints can be specified after all the columns are defined. This is called table-level definition.

A. SQL Primery key:
This contraints defines a column or combination of columns which uniquely identifies each row in the table.
For Example: CREATE TABLE EMPLOYEE
( ID NUMBER (6) PRIMARY KEY, NAME CHAR (20) dept char (15), age number (2), salary number (10), city char (15)
);

B. Foreign key or Referential Integrity:
This constraint identifies any column referencing the primary key in another table. It establishes a relationship between two columns in the same table or between different tables.
For example: Lets use the ‘Sports’ table and ‘Order – items’.
Foreign key at column level: CREATE TABLE PRODUCT
(Product-id number (8) CONSTRAINT pd-id-Pk PRIMARY KEY. Product-name char (20), supplier-name char (20), supplier-name char (20), unity-price number (12)
);

C. Notnull Contraints:
This contraints ensures all rows in the table contain a definite value for t^e column which is specified as notnull.
For example: CREATE TABLE EMPLOYEE
(id number (s), name char (20) Constraint nm-nn NOTNULL, dep char (10), age number (2), salary number (10), city char(15)
);

D. Unique key:
This constraint ensures that a column or a group of columns in each row have a distinet value.

E. Cheek constraints:
This contraints defines a business rule on a column. All the rows must satisfy this rule.

Question 36.
What is topology? Explain in detail.
Answer:
A topology is the actual appearance or layout of the network. Some of the popular topologies are Bus (Linear Bus), star, Ring & mesh.
1. Linear Bus:
The linear bus topology connects all the nodes to common straight cable. All the nodes to a common straight cable. All the nodes on the network share the common bus. The topology is very reliable since a failure on one or more nodes does not affect the bus. The disadvantages of the linear bus are the need for minimum distances between nodes to avoid signal interference. & the loss of data caused by simultaneous transmission by two nodes.

2. Star Network:
In a star network, each node is conneted directly to the central computer. All communications between the nodes have to pass through the central computer. Star network allow the network administrator to give selected hodes higher priority & also allow centralised running of diagnostic programs . Each node is connected to the central computer using a device called Hub.

2nd PUC Computer Science Model Question Paper 4 with Answers

3. Ring Network:
In a ring network, all nodes are connected to a common cable & the cable start and ends at network server. In this type of network, communications are always in one direction & the data being transmitted is passed through each node in the ring. A major disadvantage of this network is that when a node fails, it can completely halt all communications on the network.

4. Mesh: A pure mesh network has point-to-point connections between every node in the network. Pure mesh architectures are not usually considered practical. One problem is that each requires an interface for every other device on the network. Another proplem is that the amount of cable for a large network is tremendous.