2nd PUC Computer Science Model Question Paper 2 with Answers

Students can Download 2nd PUC Computer Science Model Question Paper 2 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 2 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.
Expand SMPS.
Answer:
Switched mode power supply.

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 2.
Name any one secondary storage device.
Answer:
Hard disk, Flopy, pendrive, DVD, CD etc

Question 3.
What is searching?
Answer:
Finding the location of an element in the array is called searching.

Question 4.
What is an array?
Answer:
An array is a collection of homogeneous elements with unique name adjacent memory locations.

Question 5.
Expand wwc.
Answer:
World wide web consortium.

Question 6.
Define pointer.
Answer:
A pointer is a variable that holds a memory address, usually the location of another variable in memory.

Question 7.
What is information?
Answer:
Information is processed data with some definite meaning.

Question 8.
What is the domain?
Answer:
The range of values that an attribute can have is called the Domain.

Question 9.
Define Network Topology.
Answer:
Shape, the structure of a network, or network layout is called Topology.

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 10.
What is E-commerce?
Answer:
E-commerce is the hade of goods and services with the help of telecommunication and computers.

Section – B

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

Question 11.
Write the symbol for NOT & AND gate.
Answer:
The standard symbol for NOT gate.
2nd PUC Computer Science Model Question Paper 2 with Answers 1
The standard symbol for AND gate
2nd PUC Computer Science Model Question Paper 2 with Answers 2

Question 12.
What is the function of get () & getline () functions?
Answer:

  1. The get () function is used to read a single character from the associated stream.
  2. The use of getline () function is to read a whole line of text.

Question 13.
Draw a general k – map for four variables A, B, C & D.
Answer:
2nd PUC Computer Science Model Question Paper 2 with Answers 3

Question 14.
What is meant by proof by perfect induction? Give an example.
Answer:
Boolean theorems can be proved by substituting all possible values of the variables that are 0 and 1. This technique of proving theorems is called proof by perfect induction.
Proof:
(a) 0 + x = x
If x = 0, then LHS = 0 + 0
= 0
= x
= RHS.
If x = 1, then LHD = 0 + 1
= 1
= x
= RHS.
Thus for every value of x, 0 + x = x always.

(b) 1 + x = 1
If x = 0, then LHS = 1 + 0
= 1
= RHS
If x = l, then LHS = 1 + 1
= 1
= RHS.
Thus, for every value of x, 1 + x = 1 always.

(c) 0 . x = 0
If x = 0, then LHS = 0 . 0 = 0 = RHS
If x = 1, then LHS = 0 . 1 = 0 = RHS.
Thus for every value of x, o . x = 0 always.

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 15.
Mention different types of inheritance.
Answer:

  1. Single Inheritance
  2. Multilevel Inheritance
  3. Multiple Inheritance
  4. Hierarchical Inheritance
  5. Hybrid Inheritance

Question 16.
Write the syntax & example for the class definition.
Answer:
2nd PUC Computer Science Model Question Paper 2 with Answers 4

Question 17.
Mention any two advantages of pointer.
Answer:

  • It is possible to write efficient programs.
  • Dynamic allocate & Deallocate memory.

Question 18.
Write the member funtions belonging to ifstream class.
Answer:
get (), Getline (), read (), seekg (), tellg ().

Section – C

III. Answer any 5 questions. Each question caries 3 marks (5 × 3 = 15)

Question 19.
State De – Morgan’s theorem.

  1. De – Morgan’s First theorem.
  2. De – Morgan’s Second theorem.

Answer:
1. De – Morgan’s First theorem:
De – Morgan’s 1st theorem state that, when the OR sum of two variables is invested, this is the same as investing each variable individually and then ANDing these inverted variables.
\(\overline{x+y}=\bar{x}+\bar{y}\)

2. De – Morgan’s Second theorem:
De – Morgan’s theorem states that, when the AND product of two variable is inverted, this is the same as inverting each variable and then ORing them.
\(\overline{x \cdot y}=\bar{x}+\bar{y}\)

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 20.
What is minterm? Find the minterm for AB + C.
Answer:
A minterm is a special product of literals, in which each input variable appears exactly once.
2nd PUC Computer Science Model Question Paper 2 with Answers 5

Question 21.
Mention the various operations performed on data structures.
Answer:
The basic operations non – linear data structure are as follows:

  1. Traversal: The process of accessing each data item exactly once to perform some operation is called traversal.
  2. Insertion: The process of adding a new data item into the given collection of data items is called insertion.
  3. Deletion: The process of removing an existing data item from the given collection of data items is called as deletion.
  4. Searching: The process of finding the location of a data item from the given collection of data items is called as searching.
  5. Sorting: The process of arrangement of data items in ascending or descending order is called sorting.
  6. Merging: The process of combining the data items of two structures of form a single structure is called merging.

Question 22.
How dynamic memory allocation is different from static memory allocation.
Answer:
Static Memory Allocation:

  1. Memory is allocated before the execution of the program begins [During the compilation].
  2. No Memory allocation or deallocation action is performed during the execution.
  3. Variable remain permanently allocated.
  4. Implemented using stack & heaps.

Dynamic Allocation of Memory:

  1. Memory is allocated during the execution of the program.
  2. Memory Bindings are established & destroyed during the execution.
  3. Allocated only when the program unit is active.
  4. Implemented using data segments.

Question 23.
Mention the application of the database.
Answer:

  1. Banking
  2. Water meter billing
  3. Rail and airlines
  4. Colleagues
  5. Credit card transactions

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 24.
List the components of SQL architecture.
Answer:
SQL components are:

  1. Query Dispenser
  2. Optimization Engines
  3. Classic Query Engine.
  4. SQL Query Engine.

Question 25.
Explain the HTTP?
Answer:
HTTP:
The Hypertext Transfer Protocol (HTTP) is an application-level protocol with the lightness & speed necessary for distributed. Collaborative, hypermedia information system. HTTP allows an open-ended set of methods to be used to indicate the purpose of a request.

It builds on the discipline of reference provided by the Uniform Resource Identifier (URI), as a location URL or name (URN) for indicating the resource on which a method is to be applied. Messages are passed to HTTP in a format similar to that used by internet mail & Multipurpose Internet Mail Extensions (MIME).

Question 26.
Write the advantages of WWW.
Answer:
The WWW (World Wide Web) is a set of protocols that allows you to access any document on the net through a naming system based on URL. WWW also specifies a way the Hypertext Transfer Protocol (HTTP) to send a document over the internet. Before WWW Internet was mainly used for obtaining textual information. But post – WWW, the Internet popularity grew tremendously because of graphics-intensive nature of WWW.

Section – D

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

Question 27.
Give the Boolean function F(x, y, z) = ∑(0, 2, 4, 5, 6). Reduce it using the k – map method.
Answer:
F(x, y, z) = ∑(0, 2, 4, 5, 6)
2nd PUC Computer Science Model Question Paper 2 with Answers 6
F(x, y, z) = \(\mathrm{X} \overline{\mathrm{Z}}+\overline{\mathrm{Z}}\)

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 28.
Write an algorithm to delete an element in an array.
Answer:
A is the array with N elements. ITEM is the element to be deleted in the position p & 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

Question 29
Write the differences between procedural programming and object-oriented programming.
Answer:
Procedural programming:

  1. No data hiding facility
  2. we never create a user-defined data type
  3. Program is organized as functions.

Object-oriented programming:

  1. It supports data hiding methodology
  2. We can create our own data type.
  3. Organized as class and object

30. Explain member functions.

  1. Inside class definition.
  2. Outside class definition.

Answer:
1. Inside class definition:
To define member function inside a class the function declaration within the class is replaced by actual function definition inside the class. A function defined in a class is treated as inline |unction. Only small functions are defined inside class definition.
Syntax: return – type classname (member – function)
ex: class rectangle
2nd PUC Computer Science Model Question Paper 2 with Answers 7

2. Outside class function:
A function declaration as a member ofa class is known as member function. Member functions within a class must be defined seperately outside the class. The definition of member function is similar to normal function. But a member function has an ‘identify lable’ in the header. This label tells the compiler which class the function belongs to the scope of the member function is terminated to the class mentioned in the header. Scope resolution operator “::”is used to define the member function.
Syntax: For member function outside a class.
return = type classname :: member function (argl, arg2 – arg)
{
function body;
}

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 31.
Disscuss overloaded function with syntax & example.
Answer:
Function overloading is the process of defining the functions with same name to carry out similar types of activities with various data items. Two or more functions have same name, but differ in number of arguments or data type of arguments. It is easier to understand the flow of information & debug. Each functions in the set of overload functions must have different arguments list.
t product (int p, int q, int r);
float product (float x, float y, float z);
int product (int p, int q, int r)
{
cout << ” product = “<< p × q × r << end 1;
}
float product (float x, float y, float z)
{
cout << ” product = “<< x × y × z << end 1;
}

Question 32.
Write the advantages & disadvantages of inline functions.
Answer:
Advantages of inline functions are:

  1. They are inline functions are
  2. Size of the compact function calls.
  3. Speed of execution of a program increases.

Disadvantages of inline functions are:

  1. The size of executable file increases
  2. More memory is needed
  3. Functions like recusive functions, function containing loop/switch statements are not possible to define an inline functions.

Question 33.
Differentiate between ifstream class & ofstream class.
Answer:
Ifstream:
Stream class to read from files & provides input operations for file. It inherits the function get (), getline (), read () & functions supporting random access (seekg () & tellg ()) from istream class defined inside iostream. h file.

Ofstream:
Stream class to write on file and provides output operations for file. It inherit the function put (), write () & functions supporting random access (seekp() and tellp ()) from ostream class defined inside iostream.h file.

Question 34.
Explain data independence in detail.
Answer:
Data Independence is an ability of a database to modify a schema definition at one buel without affecting a schema in the next higher level (The ability to change the conceptual schema withot affecting the external schemas or application programs). Data independence occurs because when the schema is changed at one level, the schema at next level, remain unchanged & only the mapping between the two levels is changs two types of data independence are:

  1. Logical data independence
  2. Physical data independence

All schemas are logical & actual data is stored in bit format on the disk, Namely storage medium Hard disk (all the fies will be stored), floppies, drum, tapes, SD etc., system designs choose to organize, access & process records and files in different ways depending on the type of application & the need of users. The three commonly used file organizations used in dbms/rdms data processing applications are sequential, direct & indexed sequential access method.

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 35.
Explain the working of OSI and TCP/IP.
Answer:
2nd PUC Computer Science Model Question Paper 2 with Answers 8
2nd PUC Computer Science Model Question Paper 2 with Answers 9
The Physical layer:
The physical layer is concerned with transmitting raw bots over a commumication channel. It also deals with mechanical, electrical and timing interfaces.

The Data link layer:
The main function of tha data link layer is to transform a raw transmission facillity into a line that appears free of undetected transmission errors.

The network layer:
The network layer controls the operation of the subnet. The main fanction to determine how packets are routed from source to destination.

The transport Layer:
The basic function of transport layer is to accept data from above layer and split it into smaller units if needed, and pass these to the network layer and ensure that the pieces all arrive correctly at the other end. It also determines types of service to provide to the session layes.

The session layer:
The session layer allow users on different machines to estabilsh session* between them. It includes dialog control, token management and synchronization.

The presentation layer:
The presentation layer concerned with the syntax and sematics of the information transmitted concerned with moving bits around the layer.

The application layer:
The application layer contains a variety of protocols that are commonly needed by the user. For example, HTTP[Hyper Text Transfer Protocol] which is the bases for the world wide web (www) to access web pages.

TCP/IP [Transmission Contral Protocol/Interent Protocol]:
It is the base communication protocol of the part of TCP/Ip uses numeric IP addresses to join network regment and TCP/IP provides a reliable delivery messages between networked computered. It is based on the “catenet model” This model assames that there are a large number independent networks connected together by gateways.

The user should be able to access computers or other resources on any of these networks. Datagram will pass often through a dozen differnet networks before getting their final destination. The routing needed to accomplish this should be completely invisible to the user.

As far is the user is concerned, all he need to know is order to access another system is an “internet address” This is an address that looks like 128. 64.194. 1. It is actually a 32 bit number however it is normally written as 4 decimal numbers, each reprenting 8 bits of the adderss.

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 36.
Explain single inheritance with a suitable C++ program.
Answer:
2nd PUC Computer Science Model Question Paper 2 with Answers 10
2nd PUC Computer Science Model Question Paper 2 with Answers 11
2nd PUC Computer Science Model Question Paper 2 with Answers 12

2nd PUC Computer Science Model Question Paper 2 with Answers

Question 37.
Write an alogorithm to insert a data element at the beginning of a linked list.
Answer:
1 : p ←new Node
2 : data (p) ← num
3 : link (p) ← START
4 : START ← p
5 : Return