Students can Download 2nd PUC Computer Science Previous Year Question Paper June 2015, 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 Previous Year Question Paper June 2015
Time : 3 Hrs. 15 Mins.
Max. Marks : 70
Section – A
I. Answer the following questions in a sentence each (10 × 1 = 10)
Question 1.
What is a motherboard?
Answer:
The motherboard is a large printed circuit board and every physical unit is connected to it. It is the main circuit board of computer system.
Question 2.
What is a logic gate?
Answer:
It is an electronic circuit having one or more than one input and only one output.
Question 3.
Give an example for linear data structure.
Answer:
The examples for linear data structures are stack, queues and linked lists.
Question 4.
What is a class?
Answer:
A class is a structured data type in C++ which is a collection of variables and functions.
Question 5.
Mention any one advantage of pointers.
Answer:
The advantage of pointer is memory can be allocated or deallocated dynamically.
Question 6.
What is a database?
Answer:
A database is a collection of large amount of related data. In other words, It is a collection of database tables.
Question 7.
Expand URL.
Answer:
Uniform Resource Locator.
Question 8.
Define bus topology.
Answer:
A bus topology consists of a central cable with a terminator at, each end. All nodes (file server, workstations, and peripherals) are connected to the linear cable.
Question 9.
Name any one web browser.
Answer:
The name of a web browser is Google Chrome
Question 10.
Write anyone HTML tag.
Answer:
HTML tag: <head> </head>
Section – B
II. Answer any five questions. Each question carries two marks (5 × 2 = 10)
Question 11.
State and prove involution law.
Answer:
This law states that the double complement of a variable gives the same variable.
Question 12.
What is principle of duality? Give an example.
Answer:
The Principle of duclity states that starting with a Boolean relation, another rela-tion can be derived by
- Changing each OR sing (+) to an AND sign (.)
- Changing each AND sing (.) to an OR sign (+).
- Replacing each 0 by 1 and each 1 by 0.
- All variables are complemented.
For example, (X + Y’) dual is (X’ . Y)
Question 13.
Differentiate between base class and derived class.
Answer:
- A base class is a class from which other classes are derived.
- The class that inherits is called derived class.
- The inheriting class is called the derived class.
Question 14.
Mention different types of constructors.
Answer:
The three types of constructor
- Default constructor.
- Parameterized constructor.
- Copy constructor.
Question 15.
What us stream? Mention any one stream used in C++.
Answer:
A stream is a sequence of characters that move from the source to the destination. The streams generally used for five I/O is input stream, output device like monitor.
Question 16.
Write any advantages of database system.
Answer:
The two advantages pf database system are controlling Reductendancy and Sharing of data.
Question 17.
Mention any two data types used in SQL.
Answer:
The two data types used in SQL are number and varchar2.
Question 18.
Explain circuit switching technique.
Answer:
A type of communication in which a dedicated channel (or circuit) is established at the time of transmission. For example, the telephone system, which links together wire segments to create a single unbroken line for each telephone call.
Circuit-switching systems to create a single unbroken line for each telephone call. Circuit-switching systems are ideal for communications that require data to be transmitted in real-time.
Section – C
III. Answer any five questions. Each question carries three marks (5 × 3 = 15)
Question 19.
What is the function of UPS? Mention different types of UPS.
Answer:
The function of UPS is:
- UPS unit give continuous power supply in the event of main source power break.
- It also regulates the high and low voltage in power supply.
- They give different backup power ranging from 15 minutes to several hours. Online UPS and Off-line UPS are the types of ups.
Question 20.
Write the logic diagram and truth table for a NAND gate.
Answer:
The truth table of NAND gare:
The standard symbol of NAND gate.
Question 21.
Explain the various operations performed on queue data structure.
Answer:
A queue is a non-primitive data structure where an itemis inserted at one end and removed from the other end. The queue(), enqueue (item), dequeue (), is Empty () and size () are the operations that can be performed on queues.
- Queue () – create an empty queue
- enqueue (item) – insert in lelment into the queue.
- dequeue() – remove the element from the queue.
- isEmpty () – returns true if queue is emptyotherwise false.
- size () – give the count of elements in a queue.
Question 22.
What is array of pointers? Give an example.
Answer:
The one dimensional or two-dimensional pointer array is called array of pointer. For example, int *ptr[5];. Where *ptr is array pointer variable and size of array is 5. i.e., ptr[0], ptr [1], ptr[2], ptr[3], ptr[4].
Question 23.
List the different modes of opening a file with their meaning in C++.
Answer:
The methods of opening file within C++ program
- Opening a file Using constructor
- Opening a file using member function open () of the class
Opening file using constructor:
The syntax for opening file for output purpose only is
ofstream obj (“filename”);
Example:
Ofstream fout (“results.dat”);
Question 24.
Write the different symbols used in the E-R diagram with their significance.
Answer:
The different notations for E-R Diagram
Question 25.
What is E-commerce? Explain any two types.
Answer:
The e-commerce is defined as buying and selling of products or services over electronic systems such as the Internet and other computer networks B2B – Business to business. Electronic commerce that is conducted between trader and consumers is referred to as business-to-consumer or B2C. This is the type of electronic commerce conducted by companies such as Amazon.com, ebay.com etc.
Question 26.
What is web-hosting? Mention different types of web-hosting.
Answer:
Web hosting means to put web site content on a Web server and provide fast connection to the internet. The different type of web-hosting are:
- Free Hosting
- Virtual or Shared Hosting
- Dedicated Hosting
- Colocation Hosting
Section – D
IV. Answer any Seven of the following questions. Each question carries Five marks (7 x 5 = 35)
Question 27.
Reduce F(A, B, C, D) = ∑ (1, 2, 3, 4, 5, 7, 9, 11, 12, 13, 15) using Karnaugh map.
Answer:
Reduced Boolean expression is AD + D + C.
Question 28.
Explain the memory representation of stack data structure using arrays.
Answer:
- The items into the stack are stored in a sequential order from the first location of the memory block.
- A Pointer TOP contains the location of the top element of the stack.
- A variable MAXSTK contains the maximum number or elements that can be stored in stack.
- The stack is full whent TOP = MAXSTK
- The Stack is empty when TOP = 0
Question 29.
Write an algorithm of binary search.
Answer:
Step 1: low = 0
Step 2: high = n – 1
Step 3: while (low <= high) repeat step 4 through step 6
Step 4: mid = (low + high) /2
Step 5: (ele = = a [mid]) then
Loc = mid
goto Step7
Otherwise
Step 6: is (ele < a [mid])? then
high = mid – 1
otherwise
low = mid + 1
[end while – Step 3]
Step7: Is (Loc >= 0)? then
Print “search element found at location,” loc
Otherwise
Print “Search element not found”
Question 30.
Mention any five applications of OPP.
Answer:
Some of the real life applications of object oriented programming are given below:
- 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.
Question 31.
What are access specifiers? Explain any two with examples.
Answer:
The data members and member functions can be accessed using access specifiers. They define the scope of members. The different access specifiers are private, protected and public.
Private members:
The member data and members functions defined using access specifier private, can be accessed by member functions of that class only. Non-members of the class cabbit access private members of the class. If no access specifier is mentioned for the members, then it is treated as private members.
Public members:
The public members of a class can be accessed by member functions of that class and also non member functions (outside the class) of the class. The public member functions can access private, protected and public data members of the class.
For example:
class student { Private: int regno, fees; char name [50]; public: void getdata (); void printdata (); };
The private date members reg no, fees and name can be accessed by only getdata () and printdata() public member functions of the class student.
Question 32.
What is function overloading? Explain the need for overloading.
Answer:
The overloading helps to apply polymorphism because Function overloading means two or more functions having same name but different types of arguments of different number of arguments. Whereas polymorphism refers to “One name having many forms of an object behavior depending on situations”.
Function overloading is normally used when several functions of the same name perform identical tasks on different data types. The overloading function helps to reduce the use of different names for many function. The developer of the program can use one function name to give function call to one in many functions and C++ select the appropriate function by checking the number of parameter and type of parameters.
This reduce the selecting a function block to give a function call by the user. It is easier to understand the flow of information that helps in faster debug. Easy program maintenance. There can be common interface between programs and real world objects.
Question 33.
Explain destructor with syntax and example.
Answer:
It is a special function used to release the memory space allocated by the object.
- Name of the Destructor is similar to the class, which it belongs.
- It does not have argument (s) and doesn’t return any value ( no return type)
- Destructor is preceded by ~ (tilde) sign. Following points should be kept in mind while defining and writing the syntax for the destructor:
- Ad destructor function must be declared with the same name as that of the class to which it belongs.
- The first character of the destructor name must begin with a tilde(~).
- A destructor function is declared with no return types specified (not even void).
- A destructor function must have public access in the class declaration.
General syntax of Destructors
~ Classname();
The above is the general syntax of a destructor. In the above, the symbol tilde ~ repesents a destuctor which preceds the name of the class.
For example,
class A { A() { cout << "Constructor called"; } ~A() { Count << "Destructor called"; } }; Void main() { Aobjl; // constructor called int x = 1; if (x) { A obj 2; / / constructor called } / / destructor called for obj2 } / / destructor called for obj1
Question 34.
What is inheritance? Mention its advantages.
Answer:
In object-oriented programming, inheritance is a way to form new classes using classes that have already been defined.
- Reusability: Inheritance helps the code to be reused in many situations.
- Saves Time and Effort: Since the main code written can be reused in various situations as needed.
- Easy Maintenance: The different part of the programs written in C++ can be easily maintained due to the features of inheritance, polymorphism, dynamic binding etc.,
- Easy to extend: The programs can be extended with new features by adding very easily.
- Memory utilisation: Due to the feature of dynamic binding and dynamic memory allocation (new and delete), memory can be efficiently used.
Question 35.
Define the following database terms
- Data model
- Tuple
- Domain
- Primary Key
- Foreign Key
Answer:
- Data model: Data models are fundamental entities that define how the logical structure of a database in modeling. Data models define how data is connected to each other and how they are processed and stored inside they system.
- Tuple Collection of related fields (e.g.Name, Age, register number, Marks)
- Domain: A domain describes the set of possible values for a given attribute.
- Primary key: A primary key is a field in a table which uniquely identifies each row/record in a database table. Primary keys must contain unique values. A primary key column cannot have NULL values.
- Foreign key: A foreign key is a key used to link two tables together. Foreign Key is a column or a combination of columns whose values match a Primary Key in a different table.
Question 36.
What is data definition language? Explain SELECT and UPDATE commands.
Answer:
Data Definition Language commands create database objects such as tables, views etc., The various Data definition language commands are Create Table, Alter Table, Create View, Drop Table etc.,
Select Command:
It is used to view tuple/records from the tables. It is a read only command.
Usage:
select columns from table _ name where condition;
Example:
select * from table name;
select columnnamel, columnname2, …. From tablename;
Select * from tablename where coiumnname = value
UPDATE command:
The update command is used to change row values from a table. The SET keyword takes the column in which values needs to be changed or updated.
Syntax: update tablename set coiumnname = value where condition;
Example:
update marks set total = marks 1 + mark2 + marks3 where class = “IIPUC”;
Question 37.
Give the measures for preventing virus.
Answer:
The different measures for preventing virus are:
1. Install quality antivirus:
The users should install professional, business-grade antivirus software on their PCs. Pro-grade antivirus programs update more frequently throughout the, protect against a wider range of threats (such as rootkits), and enable additional protective features (such as custom scans).
2. Install real-time anti – spyware protection:
Use of professional (or fully paid and licensed) anti-spyware programs are required to prevent infections and fully remove those infections already present.
3. Keep anti-malware applications current:
Antivirus and anti-spyware programs require regular signature and database updates. Without these critical updates, anti-malware programs are unable to protect PCs from the latest threats. Computer users must keep their antivirus and anti-spyware applications up to date.
4. Perform daily scans:
Enabling complete, daily scans of a system’s on hard drive gives protection. These daily scans can be invaluable in detecting, isolating, and removing infections that initially escape security software’s attention.
5. Disable autorun:
Many viruses work by attaching themselves to a drive and automatically installing themselves. As a result, connecting any network drives, external hard disks, or even thumb drives to a system can result in the automatic propagation of such threats. The users can disable the Windows autorun feature to avoid.
6. Don’t click on email links or attachments:
Users should never click on email attachments without at least first scanning them for viruses using a business-class anti-malware application. As for clicking on. links, users should access Web sites by opening a browser and manually navigating to the sites.
7. Use a hardware-based firewall:
The software-based firewall included with Windows isn’t sufficient to protect systems. For this reason, all PCs connected to the Internet should be secured behind a capable hardware-based firewall.