2nd PUC Kannada Previous Year Question Paper June 2016

Students can Download 2nd PUC Kannada Previous Year Question Paper June 2016, Karnataka 2nd PUC Kannada Model Question Papers with Answers help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Kannada Previous Year Question Paper June 2016

2nd PUC Kannada Previous Year Question Paper June 2016 1
2nd PUC Kannada Previous Year Question Paper June 2016 2
2nd PUC Kannada Previous Year Question Paper June 2016 3
2nd PUC Kannada Previous Year Question Paper June 2016 4
2nd PUC Kannada Previous Year Question Paper June 2016 5

2nd PUC Kannada Previous Year Question Paper June 2016 6
2nd PUC Kannada Previous Year Question Paper June 2016 7
2nd PUC Kannada Previous Year Question Paper June 2016 8
2nd PUC Kannada Previous Year Question Paper June 2016 9
2nd PUC Kannada Previous Year Question Paper June 2016 10

2nd PUC Kannada Previous Year Question Paper June 2016 11
2nd PUC Kannada Previous Year Question Paper June 2016 12

2nd PUC Kannada Previous Year Question Paper March 2016

Students can Download 2nd PUC Kannada Previous Year Question Paper March 2016, Karnataka 2nd PUC Kannada Model Question Papers with Answers help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Kannada Previous Year Question Paper March 2016

2nd PUC Kannada Previous Year Question Paper March 2016 1
2nd PUC Kannada Previous Year Question Paper March 2016 2
2nd PUC Kannada Previous Year Question Paper March 2016 3
2nd PUC Kannada Previous Year Question Paper March 2016 4
2nd PUC Kannada Previous Year Question Paper March 2016 5

2nd PUC Kannada Previous Year Question Paper March 2016 6
2nd PUC Kannada Previous Year Question Paper March 2016 7
2nd PUC Kannada Previous Year Question Paper March 2016 8
2nd PUC Kannada Previous Year Question Paper March 2016 9
2nd PUC Kannada Previous Year Question Paper March 2016 10

2nd PUC Kannada Previous Year Question Paper March 2016 11
2nd PUC Kannada Previous Year Question Paper March 2016 12

2nd PUC Kannada Previous Year Question Paper June 2017

Students can Download 2nd PUC Kannada Previous Year Question Paper June 2017, Karnataka 2nd PUC Kannada Model Question Papers with Answers help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Kannada Previous Year Question Paper June 2017

2nd PUC Kannada Previous Year Question Paper June 2017 1
2nd PUC Kannada Previous Year Question Paper June 2017 2
2nd PUC Kannada Previous Year Question Paper June 2017 3
2nd PUC Kannada Previous Year Question Paper June 2017 4
2nd PUC Kannada Previous Year Question Paper June 2017 5

2nd PUC Kannada Previous Year Question Paper June 2017 6
2nd PUC Kannada Previous Year Question Paper June 2017 7
2nd PUC Kannada Previous Year Question Paper June 2017 8
2nd PUC Kannada Previous Year Question Paper June 2017 9
2nd PUC Kannada Previous Year Question Paper June 2017 10

2nd PUC Kannada Previous Year Question Paper June 2017 11
2nd PUC Kannada Previous Year Question Paper June 2017 12
2nd PUC Kannada Previous Year Question Paper June 2017 13
2nd PUC Kannada Previous Year Question Paper June 2017 14
2nd PUC Kannada Previous Year Question Paper June 2017 15

2nd PUC Computer Science Question Bank Chapter 10 Inheritance

You can Download Chapter 10 Inheritance Questions and Answers, Notes, 2nd PUC Computer Science Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Computer Science Question Bank Chapter 10 Inheritance

2nd PUC Computer Science Inheritance One Mark Questions and Answers

Question 1.
What is inheritance?
Answer:
In object-oriented programming, inheritance is a way to form new classes using classes that have already been defined.

Question 2.
How to implement inheritance?
Answer:
The inheritance is implemented using the following syntax class derived_classname : access specifier base classname.

Question 3.
What is base class?
Answer:
A base class is a class from which other classes are derived.

Question 4.
What is derived class?
Answer:

  • The class that inherits is called derived class.
  • The inheriting class is called the derived class.

Question 5.
What is public access specifier?
Answer:
It means “public parts of base class remain public and protected parts of base class remain protected for derived class”.

KSEEB Solutions

Question 6.
What is private access specifier?
Answer:
The private access specifier means “Public and Protected Parts of base class remain Private in derived class”.

Question 7.
Mention any one advantage of inheritance? .
Answer:
The one advantage of inheritance is reusability.

Question 8.
Is inheritance possible in c?
Answer:
No, because it doesn’t support object oriented concept.

Question 9.
What is the use of protected access specifier?
Answer:
The private member of a base class cannot be inherited to the derived class and protected member of a base class remains protected in a derived class.

Question 10.
What is the use of public access specifier?
Answer:
The private members of a base class cannot be inherited and protected members remain protected in a derived class.

Question 11.
What is the use of private access specifier?
Answer:
The private members of a base class cannot be inherited and protected members of a base class become private members to derived class.

KSEEB Solutions

Question 12.
What is single inheritance?
Answer:
It is a derived class with only one base class is called single inheritance

Question 13.
What is multilevel inheritance?
Answer:
A class can be derived from another derived class which is known as multilevel inheritance.

Question 14.
What is hierarchical inheritance?
Answer:
When the properties of one class are inherited by more than, one class, it is called hierarchical inheritance.

Question 15.
What is hybrid inheritance?
Answer:
It is the combination of hierarchical and multilevel inheritance.

Question 16.
What is mulitple inheritance?
Answer:
When a class inherit properties from more than one class is known as multiple inheritance

Question 17.
What is virtual base class?
Answer:
The base class is declared as the virtual base class so that only one copy of its members are inherited by the derived class in a hybrid inheritance.

Question 18.
What is an abstract class?
Answer:
Abstract class is one that is not used to create objects. An abstract class is designed only to act as a base class.

Question 19.
When do we need to inherit?
Answer:
Suppose X is a class exist and we need new class Y having all properties of X and in addition to its own, then we need to inherit X class to derive Y class.

KSEEB Solutions

Question 20.
When is it necessary to use inheritance?
Answer:
When a newly created class need to acquire properties of existing class and with its own properties then it is necessary to use inheritance.

Question 21.
What is visibility mode?
Answer:
The visibility mode in inheritance specify the access mode of base class members to derived class.

2nd PUC Computer Science Inheritance Two Mark Questions and Answers

Question 1.
How to implement inheritance?
Answer:
The inheritance is implemented using the following syntax
class derived_class name : access specifier base class name

Question 2.
What is the difference between public and private access specifier?
Answer:
In public access mode, protected members of base class remain protected in a derived class. In private access mode, protected members of a base class become private members in a derived class. And the private members of a base class cannot be inherited in both the access mode.

Question 3.
Mention any two advantages of inheritance?
Answer:

  • 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.

Question 4.
Mention any two types of inheritance.
Answer:

  • Single inheritance: A derived class with only one base class is called single inheritance
  • Multiple inheritance: A class can inherit properties from more than one class which is known as multiple inheritance.

KSEEB Solutions

Question 5.
What is the difference between inheritance and polymorphism?
Answer:
The concept of inheritance provides the idea of reusability. This means that we can add additional features to an existing class without modifying it. Polymorphism means that if the same message is sent to different objects, the object’s behavior depends on the nature of the object it self This means that a general class of operations may be accessed in the same manner even though specific action associated with each operation may differ.

Question 6.
What is single inheritance? Give an example.
Answer:
Single inheritance:
A derived class with only one base class is called single inheritance. For example, If A is base class then class B derive from base class A.

Question 7.
What is multilevel inheritance? Give an example.
Answer:
A class can be derived from another derived class which is known as multilevel inheritance. For example, The derived class C inherit B class whereas B is derived from class A.

Question 8.
What is hierarchical inheritance? Give an example.
Answer:
When the properties of one class are inherited by more than one class, it is called hierarchical inheritance. For example, class B, C and D are derived from base class A.

KSEEB Solutions

Question 9.
What is hybrid inheritance? Give an example.
Answer:
It is the combination of hierarchical and multilevel inheritance. For example, The derived class D derive from the classes B and C whereas both the classes B and C are derived from base class A.

Question 10.
What is multiple inheritance? Give an example.
Answer:
A class can inherit properties from more than one class which is known as multiple inheritance. For example, the class C derive from base class A and base class B.

Question 11.
What is virtual base class? Give example.
Answer:
The base class is declared as the virtual base class so that only one copy of its members are inherited by the derived class in a hybrid inheritance. For example, the derived class D derive from the classes B and C whereas both the classes B and C are derived from base class A. Then base class A is inherited twice and to avoid two copies of class A to class D, class A is declared virtual base class.

Question 12.
What is an abstract class?
Answer:
The class is not used to create objects are called abstract class. It is used as base class to get derive class only.

KSEEB Solutions

Question 13.
Which are the components which cannot be inherited?
Answer:
A derived class inherits every member of a base class except:

  • its constructor and its destructor
  • its operator=() members
  • its friends

Question 14.
Explain single inheritance with a suitable C++ program.
Answer:
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 1
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 2
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 3

KSEEB Solutions

Question 15.
Explain multilevel inheritance with a suitable C++ program
Answer:
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 4
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 5
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 6
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 7

Question 16.
Explain multiple inheritance with a suitable C++ program.
Answer:
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 8
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 9
2nd PUC Computer Science Question Bank Chapter 10 Inheritance 10

KSEEB Solutions

Question 17.
How does inheritance influence the working of constructor?
Answer:
The inheritance influence the working of constructor, if base class contains parameterized constructor, then it is compulsory to pass the arguments using derived class. Normally derived class is used to declare objects therefore derived class is used to pass arguments to base class constructor.

If both base class and derive class has constructors, then base class constructor is executed first and then derived class constructor is executed i.e., pass the value using derived class to base class constructor and then to derived class constructor. The derived class is responsible to pass arguments to both base class as well as derived class.

Question 18.
How does inheritance influence the working of destructors?
Answer:

  • Constructors, destructors and overloaded assignment operators are not inherited.
  • C++ requires that a derived-class constructor call its base-class constructor to initialize the base-class data members that are inherited into the derived class.
  • If the derived-class’s constructor did not invoke the base-class’s constructor explicitly, C++ would attempt to invoke the base class’s default constructor.
  • When an object of a derived class is built(constructed):
  • the base-class’s constructor is called immediately to initialize the base-class data members in the derived-class object and then
  • the derived-class constructor will initialize the additional derived-class data members.
  • When a derived-class object is destroyed, the destructors are called in the reverse order of the constructors:
  • First the derived-class destructor is called, then the base-class destructor.
  • When deriving a class, the base class may be declared as either public, protected, or private.

2nd PUC Computer Science Question Bank Chapter 6 Basic Concepts of OOP

You can Download Chapter 6 Basic Concepts of OOP Questions and Answers, Notes, 2nd PUC Computer Science Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Computer Science Question Bank Chapter 6 Basic Concepts of OOP

2nd PUC Computer Science Basic Concepts of OOP One Mark Questions and Answers

Question 1.
What is the fundamental idea of object oriented programming?
Answer:
Object-oriented programming (OOP) is a programming language model organized around “objects” rather than “actions” and data rather than logic of the program.

Question 2.
What is an object?
Answer:
An object is a combination of code and data that can be treated as a unit. An object can be considered any real time entity (existing thing) that can perform a set of related activities.

Question 3.
Define the term class.
Answer:
The class is a collection of objects that have the similar properties and common behaviour.

Question 4.
Define the term data abstraction.
Answer:
The process of hiding the representation of various data items and implementation details of a function from the user program is called data abstraction.

KSEEB Solutions

Question 5.
What is encapsulation?
Answer:
It is the method of combining the data, attributes and methods in the same entity is called encapsulation.

Question 6.
What is meant by function overloading?
Answer:
Two or more functions with the same name is called function overloading.

Question 7.
Define polymorphism.
Answer:
Polymorphism is a Greek word that means Many Shapes. In OQP Polymorphism means the ability to take on many forms. The term is applied both to objects and to functions.

Question 8.
What is inheritance?
Answer:
Inheritance is the process by which new objects can acquire the properties of an existing objects of other class.

Question 9.
What is a base class?
Answer:
A base class is a class, in an object-oriented programming language, from which other classes are derived.

Question 10.
What is a derived class?
Answer:
A derived class is a class created or derived from another existing class.

Question 11.
How are base class and derived class related?
Answer:
The hierarchical relationship between derived class and base class is known as an “is a” relationship.

Question 12.
Define the term data hiding.
Answer:
Data Hiding is the mechanism where the details of the class are hidden from the user.

Question 13.
What do you mean by dynamic binding?
Answer:
It means code associated with a procedure call is known only at the time of execution of program. It is the process of connected one program block to another.

KSEEB Solutions

Question 14.
What is message passing?
Answer:
It is the process of specifying the name of objects, name of the function and the information to be sent.

Question 15.
Mention the two types of overloading.
Answer:
The two types of overloading is operator overloading and function overloading.

2nd PUC Computer Science Basic Concepts of OOP Two Marks Questions and Answers

Question 1.
What is the significance of classes in OOP?
Answer:
The Class allow to group functions and data variables. The class is a way to grouping objects having similar characteristics. The objects can be made user defined data type with the help of a class.

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

Question 3.
Mention different types of inheritance.
Answer:
The different types of inheritance are single inheritance, multilevel inheritance, multiple inheritance, hierarchical inheritance and hybrid inheritance.

Question 4.
Mention any two advantages of object oriented programming over earlier programming methods.
Answer:

  1. OOP provides useful features like Inheritance, polymorphism and encapsulation, not available in earlier programming methods.
  2. Once an Object is created, knowledge of its implementation is not necessary for its use. In older programs, coders needed understand the details of a piece of code before using it in this or another program.

Question 5.
Explain the structure of object.
Answer:
The object is a collection of data members and member function. Objects occupy space in memory and have address associated with them. Objects interact by sending messages to one another.

KSEEB Solutions

Question 6.
Explain data encapsulation.
Answer:
The data encapsulation is a technique that combines data and functions into a single unit called class. Here, data can be accessed through member function only present inside the class. Data encapsulation enables data hiding or information hiding.

2nd PUC Computer Science Basic Concepts of OOP Three Marks Questions and Answers

Question 1.
Briefly discuss the classes and objects.
Answer:
A class is a definition of an object. It is data type just like int. A class is a type, and an object of this class is just like a variable. In other words, class is a blue print and object can be considered as any real time entity (existing thing) that can perform a set of related activities.

Question 2.
Explain inheritance.
Answer:
Inheritance is the process of creating new classes, called derived class, from existing or base classes. The derived class inherits all the capabilities of the base class. Using Inheritance some qualities of the base classes are added to the newly derived class, apart from its own features. Inheritance permits code reusability.

KSEEB Solutions

Question 3.
Write short notes on polymorphism.
Answer:
The polymorphism is ability of an object to take more than one form in different instances. For example, one function name can be used for different purposes. Similarly, same operator can be used for different operations. There are of two types one is the “compile time polymorphism” and other one is the “run-time polymorphism”.

Question 4.
Mention any 4 high level languages that follow object oriented programming approach.
Answer:
The four high level languages that follow object oriented programming approach are

  • C++
  • C#
  • Java
  • Python
  • Visual Basic

2nd PUC Computer Science Basic Concepts of OOP Five Mark Questions and Answers

Question 1.
Write the differences between procedural programming and object oriented programming.
Answer:
Difference between Procedure Oriented Programming (POP) & Object Oriented Programming (OOP)

Procedure Oriented Programming Object Oriented Programming
In POP, program is divided into small 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.
POP follows Top Down approach. OOP follows Bottom Up approach.
POP does not have any access specifier. OOP has access specifiers named Public, Private, Protected, etc.
In POP, Data can move freely from function to function in the system. In OOP, objects can move and communicate with each other through member functions.
To add new data and function in POP is not so easy. OOP provides an easy way to add new data and function.
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.’

Question 2.
Explain advantages of OOPs.
Answer:

  1. OOP provides a dear modular structure for programs. Large problems can be reduced to smaller and more manageable problems.
  2. In OOP, data can be made private to a class such that only member functions of the class can access the data. This principle of data hiding helps the programmer to build a secure program.
  3. Implementation details are hidden from other modules and other modules has a clearly defined interface.
  4. It is easy to maintain and modify existing code as new objects can be created with small differences to existing ones.
  5. With the help of polymorphism, the same function or same operator can be used for different purposes. This helps to manage software complexity easily.
  6. In OOP, programmer not only defines data types but also deals with operations applied for data structures.
  7. It is easy to model a real system as real objects are represented by programming objects in OOP.
  8. With the help of inheritance, we can reuse the existing class to derive a new class such that the repetition of code is eliminated and the use of existing class is ex¬tended. This saves time and cost of program.

KSEEB Solutions

Question 3.
Write the disadvantages of object oriented programming.
Answer:
The few dis-advantages of OOP are
1. Size:
Object Oriented programs are much larger than other programs. In the early days of computing, space on hard drives, floppy drives and in memory was at a premium. Today we do not have these restrictions.

2. Effort:
Object Oriented programs require a lot of work to create. Specifically, a great deal of planning goes into an object oriented program well before a single piece of code is ever written. Initially, this early effort was felt by many to be a waste of time. In addition, because the programs were larger (see above) coders spent more time actually writing the program.

3. Speed:
Object Oriented programs are slower than other programs, partially because of their size. Other aspects of Object Oriented Programs also demand more system resources, thus slowing the program down.

4. Not suitable for all types of problems:
There are problems that lend themselves well to functional-programming style, logic -programming style, or procedure-based programming style, and applying object-oriented programming in those situations will not result in efficient programs.

5. Not all programs can be modeled accurately by the objects model. If you just want to read in some data, do something simple to.it and write it back out, you have no need to define classes and objects. However, in some OOP languages, you may have to perform this extra step.

6. The objects often require extensive documentation.

Question 4.
Write the real life applications of object oriented programming.
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.

2nd PUC Computer Science Question Bank Chapter 5 Review of C++ Covered in First PUC

You can Download Chapter 5 Review of C++ Covered in First PUC Questions and Answers, Notes, 2nd PUC Computer Science Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Computer Science Question Bank Chapter 5 Review of C++ Covered in First PUC

2nd PUC Computer Science Review of C++ Covered in First PUC One Mark Questions and Answers

Question 1.
What does OOP mean?
Answer:
OOP means Object-Oriented Programming.

Question 2.
What is object-oriented programming?
Answer:
Object-oriented programming (OOP) is a programming language model organized around “objects” rather than “actions” and data rather than logic of the program.

Question 3.
Define object.
Answer:
An object is a combination of code and data that can be treated as a unit. An object can be considered any real-time entity (existing thing) that can perform a set of related activities.

KSEEB Solutions

Question 4.
Define class.
Answer:
A class is simply a representation of a type of object. It is the blueprint/ plan/ template that describe the details of an object.

Question 5.
Which programming approach the OOP follows?
Answer:
The OOP follows Bottom-up approach of programming.

Question 6.
What is the meaning of abstraction in OOP?
Answer:
Abstraction in OOP is “A model of a complex system that includes only the details essential to the perspective of the viewer of the system.”

Question 7.
Define encapsulation.
Answer:
It is the method of combining the data, attributes, and methods in the same entity is called encapsulation.

Question 8.
What is polymorphism?
Answer:
Polymorphism is a Greek word that means Many Shapes. In OOP Polymorphism means the ability to take on many forms. The term is applied both to objects and to operations.

KSEEB Solutions

Question 9.
What is dynamic binding?
Answer:
Dynamic binding means link exist between procedure call and code to be execute at run time when that procedure is call.

Question 10.
What is message passing?
Answer:
Message passing is a method by which an object sends data to another object or requests other object to invoke a method. This is also known as interfacing.

Question 11.
Describe tokens
Answer:
The smallest individual units in a program are known as tokens.

Question 12.
Mention few tokens.
Answer:
The few tokens are Keywords, identifiers, constants, strings, and operators.

Question 13.
What is a keyword?
Answer:
All keywords (reserved words) are basically the sequences of characters that have one or more fixed meanings.

Question 14.
What are identifiers?
Answer:
Identifiers are names given to the program elements such as variables, arrays, and functions.

Question 15.
What are constants?
Answer:
The quantity, which does not change during the execution of a program, is known as a constant.

Question 16.
Define character set.
Answer:
It is a set of symbols that a programming language identifies and used in writing data and instructions in a programming language.

KSEEB Solutions

Question 17.
What is integer constant?
Answer:
Integer constants are the whole number without any fractional part.

Question 18.
What are floating-point constants?
Answer:
Floating-point constants are numeric values that contain decimal point and can contain exponents.

Question 19.
Define octal constant.
Answer:
It consists of a sequence of digits starting with 0 (zero).

Question 20.
Define hexadecimal constants.
Answer:
It consists of a sequence of digits from 0 to 9 and A, B,C, D, E, F alphabet symbols that represent decimal numbers 10,11,12,13,14, and 15 respectively preceded by ox or OX.

Question 21.
What are character constants?
Answer:
A character constant in C++ must contain one or more characters and must be enclosed in single quotation marks.

Question 22.
What is an operator?
Answer:
An operator is a symbol that performs specific operation and gives a value as the result.

Question 23.
What are arithmetic operators?
Answer:
The symbols that perform addition, subtraction, multiplication, modulus, and division are called arithmetic operators.

Question 24.
Give the difference between / and % arithmetic operators.
Answer:
The arithmetic operator / perform division and gives out the quotient as a result. The arithmetic operator % performs division and gives out the reminder as a result.

KSEEB Solutions

Question 25.
What is an operand?
Answer:
The operand is a data item on which the operator perform some activity.

Question 26.
What are unary operators?
Answer:
An operator that takes only one operand to perform some operation is called a unary operator.

Question 27.
What are binary operators?
Answer:
The operators which takes two operands to perform some operation is called a binary operator.

Question 28.
What are relational operators?
Answer:
The operators which perform operation of relation between two operands called relational operators.

Question 29.
What are logical operators?
Answer:
The operators which perform combine or negate the expressions that contains relational operators are called logical operators.

Question 30.
What is the function of bitwise operator?
Answer:
Bit manipulation operators manipulate individual bits within a variable. Bitwise operators modify variables considering the bit patterns that represent the values they store.

Question 31.
What is meant by shorthands in C++?
Answer:
In C++ shorthands means writing the certain type of assignment statements in simplified manner.

Question 32.
What is a ternary operator?
Answer:
The operator that operates on three operands is called the ternary operator.

Question 33.
What is an expression?
Answer:
An expression is a combination of constants, variables, operators, functions calls which produces a particular value to be used in any other context.

Question 34.
What is a statement?
Answer:
Statement is an instruction to the computer telling it what to do for instance assigning an expression value to a variable because it produces an instructions tells the computer to assign a value to something.

Question 35.
What is the use of iostream.h in C++?
Answer:
Iostream stands for input/output stream. It is a header file which we include in our programs to perform basic input-output operations.

KSEEB Solutions

Question 36.
Mention any two ctype.h functions.
Answer:
Toupper() and tolower() are the two example for ctype.h functions.

Question 37.
Mention any two string.h functions.
Answer:
Strupr() and strlwr().

Question 38.
Mention any two functions of stdio.h
Answer:
Printf() and scanf() are the two functions of stdio.h.

Question 39.
Mention any two functions of stdlib.h
Answer:
Atoi() and itoa() are the two functions for stdlib.h

Question 40.
What is a preprocessor directive?
Answer:
Preprocessor directive is a command that is considered for execution before the processor executes the program.

Question 41.
What is meant by data types?
Answer:
The set of values along with the operations that can be performed on these values are called as data types.

Question 42.
Give the classification of data types.
Answer:
Data types are classified into built-in or basic data types and user-defined or derived data types.

Question 43.
Name the built-in data types of C++.
Answer:
The built-in or basic data types supported by C++ are integer, floating-point, and character.

Question 44.
How is derived data type created?
Answer:
The derived data type is created by using basic data types.

Question 45.
What is a linear data structure?
Answer:
The data elements are arranged in a sequential manner is called a linear data structure.

Question 46.
What is the non-linear data structure?
Answer:
The data elements that are arranged non-sequentially is called non-linear data structure.

Question 47.
Define modifiers.
Answer:
The modifiers change the meanings of the predefined built-in data types and expand them to a much larger set.

Question 48.
Write the different modifiers.
Answer:
The different modifiers are long, short, signed and unsigned.

Question 49.
What is a stream?
Answer:
A stream is an object where a program can either insert or extract characters to/from it.

KSEEB Solutions

Question 50.
Give the classification of stream.
Answer:

  • input streams
  • output streams

Question 51.
What is input stream?
Answer:
Input stream is a sequence of characters from input device like keyboard to the program of a computer.

Question 52.
What is output stream?
Answer:
Output stream is a sequence of characters from the program to output device like monitor, printer.

Question 53.
What is meant by stream extraction?
Answer:
cin is used in conjunction with >> operator, known as extraction or get from operator.

Question 54.
What is meant by stream insertion?
Answer:
cout is used in conjunction with << operator, known as insertion or put to operator.

Question 55.
Give the syntax of cin statement.
Answer:
Syntax: cin >> variable.

Question 56.
Give the syntax of cout statement.
Answer:
Syntax : cout << expression or manipulator

Question 57.
What is cascading in I/O operations?
Answer:
The cascading is a way to extract/insert multiple values from/into more than one variable using one cin/cout statement.

Question 58.
What are manipulators?
Answer:
A manipulator is a C++ is used to control the formatting of output and/or input values.

Question 59.
Give an example for manipulator.
Answer:
endl is a manipulator.

Question 60.
What is a statement?
Answer:
Statements are the instructions given to the computer to perform any kind of action. Action may be in the form of data movement, decision making, etc.

Question 61.
What are control statements?
Answer:
Control Statements are elements in the program that control the flow of program execution.

Question 62.
Write the classification of control statements.
Answer:
The control statements are classified as

  1. Selection statement
  2. Iterative statement
  3. Jump statement

Question 63.
What is meant by the compound statement?
Answer:
A compound statement is a grouping of statements enclosed between the pair of braces ({ }) in which each individual statement ends with a semi-colon.

KSEEB Solutions

Question 64.
What are selection statements?
Answer:
The selection statements are used to execute certain block of statements the evaluating the condition.

Question 65.
What is a block?
Answer:
The group of statements separated by a semicolon and is marked with {} is called block.

Question 66.
What is the purpose of if statement?
Answer:
The if statement is used to decide on whether a statement or a block should be executed or not.

Question 67.
Define the term looping.
Answer:
The looping means execution of a statement or block of statements again and again until the condition is true.

Question 68.
Why is while loop is called a pre-tested looping statement?
Answer:
The while loop evaluates the condition in the beginning itself to select statement for execution repeatedly. Therefore it is called pre-tested looping statement.

Question 69.
What is post-tested looping statement?
Answer:
The loop evaluates the condition in the end of the looping structure and select a statement for execution repeatedly. Therefore it is called post-tested looping statement.

Question 70.
Name the post-tested looping statement.
Answer:
The do-while statement is called a post-tested looping statement.

Question 71.
Which structure is called a fixed-execution looping statement?
Answer:
The ‘for’ looping statement is called a fixed-execution looping statement.

Question 72.
When is ‘for’ used?
Answer:
If a programmer knows the exact number of repetition to be carried among the set of statements then ‘for’ conditional statement is used in a program.

Question 73.
What is the nesting of the loop?
Answer:
If the loop appears inside the body of another loop is called a nested loop.

Question 74.
What is an Array?
Answer:
Array is a group of similar elements that share a common name.

Question 75.
What is the use of arrays?
Answer:
Use of arrays reduces the creation and use of more number of individual variables in a program. It also helps to reduce the program length.

Question 76.
Mention the different types of arrays.
Answer:
There are three types of arrays

  1. One dimensional array
  2. Two-dimensional array
  3. Multidimensional array

KSEEB Solutions

Question 77.
What is Index or subscript of an Array?
Answer:
Subscript is used to identify/locate the position of array elements.

Question 78.
What is zero-based indexing?
Answer:
If ‘i’ is the element, then its index number would be i-1 is called zero-based indexing.

Question 79.
What is the subscript of the first element of an array?
Answer:
The first element i = 1, then subscript is 0 because of i-1 i.e., 1-1.

Question 80.
Mention any one feature of subscript or index of an array.
Answer:
Subscript or index of an array is always a positive whole number.

Question 81.
Define a one-dimensional array.
Answer:
One dimensional array is a collection of similar elements that share a common name and is structured in one dimension.

Question 82.
Give the declaration syntax of a one-dimensional array.
Answer:
datatype arryname [size];

Question 83.
What is meant by initialization of an array?
Answer:
Initialization means assigning values to declared variables or arrays. To initialize an array, each and every element of the array has to be referred and then value is assigned to it.

Question 84.
Give an example showing initialization of one-dimensional array.
Answer:
int marks[6] = {91,96,90, 94,99,93};

Question 85.
Define a two-dimensional array.
Answer:
Two-dimensional array is a collection of elements of similar type that share a common name, structured in two dimensions. Each element is accessed by two index values.

Question 86.
Write the declaration syntax of two-dimensional array.
Answer:
Syntax:
<data-type> <array-name> [<size1>] [<size2>];

Question 87.
Give an example of, How a two-dimensional array is declared?
Answer:
int marks[5][5];

Question 88.
Give one example showing initialization of two-dimensional array.
Answer:
Example of array initialization with declaration:
int matrix [3] [3] = {91, 96, 90, 94,99,95,87,92,98};

Question 89.
Declare an array to store the 6 subject marks of 500 students.
Answer:
Int marks [500] [6];

Question 90.
How an element in the two-dimensional array is accessed?
Answer:
An element in the two-dimensional array is accesses using two index/subscript numbers. The first number indicates the row index and the second number indicates the column index.

Question 91.
Define multidimensional array.
Answer:
A collection of similar elements structured in N dimensions where N>=1. Each element is accessed by N indices.

Question 92.
Define function.
Answer:
A FUNCTION is a self-contained block of statements that perform a specific task with a name given to it.

Question 93.
How are functions classified?
Answer:
The functions classified as

  1. Library function/pre-defined functions
  2. User-defined functions

Question 94.
What is a Predefined Functions in C++?
Answer:
Predefined functions are functions that are built into C++ Language to perform some standard operations that are stand-alone and used for general purposes.

KSEEB Solutions

Question 95.
What is the header file?
Answer:
A header file is a file containing all the library function definitions that can be used in a program.

Question 96.
List any two basic types of standard library functions.
Answer:

  1. I/O Functions.
  2. Mathematical Functions – math.h

Question 97.
Write the names of any two C++ header files.
Answer:
The two header files are

  • iostream.h
  • iomanip.h

Question 98.
List the names of any two functions of iostream.h header file.
Answer:
The two functions of iostream.h files are

  • cin
  • cout

Question 99.
List the names of any two functions of iomanip.h header file.
Answer:
The two functions of iomanip.h files are

  1. endl
  2. setw

Question 100.
What is the main function of iostream.h header file?
Answer:
The iostream.h header file contains C++ streams and i/o routines functions. It is a header file which we include in our programs to perform basic input output operations. We use cin in program to get input from the keyboard. To use cin and cout, we must add iosream.h header file.

Question 101.
What is the main function of iomanip.h header file?
Answer:
The iomanip.h header file contains various function and macros for i/o manipulations for creating parameterized manipulations.

Question 102.
Define string.
Answer:
The term string is defined as a character array terminated with a null character [‘\0’].

Question 103.
What is null in string?
Answer:
The null in a string is control character ‘\0’ that indicate the end of the string.

Question 104.
How is string declared?
Answer:
The declaration of string is
char arrayname[ size];

Question 105.
Give one example of string initialization.
Answer:
char name[50]=”bharath”;

Question 106.
Name the function used for string input.
Answer:
The function getline() is used to read a string.

KSEEB Solutions

Question 107.
How is input is terminated in getline()?
Answer:
The input gets terminated when a newline character is entered or when entered character length is equal to the size of character array.

Question 108.
Name function used for string output.
Answer:
The function write() is used for string output.

Question 109.
What is a null string?
Answer:
The length of the string 0 is called a null string.

Question 110.
What is a user-defined function?
Answer:
A user-defined FUNCTION is a self-contained block of statements that perform a specific task with a name given to it defined by the user in a program.

Question 111.
Mention any one advantage of user-defined function.
Answer:
Code Reusability:
writing the same sequence of code at two or more locations in the program can be avoided with the use of functions and Universal use feature reduces rewriting of codes again and again.

Question 112.
What is meant function definition?
Answer:
A function definition provides the actual body of the function with a name that you call it by, a list of zero or more arguments and it may give back a return value, of a particular type.

Question 113.
What is function declaration?
Answer:
A function declaration tells the compiler about a function’s name, return type, and parameters.

Question 114.
What is meant by calling a function?
Answer:
To use a function, the user will have to call or invoke that function. It helps to execute the function and perform the process of a function.

Question 115.
What is called function?
Answer:
A called function is a function which is called from the calling function.

Question 116.
How is a function invoked?
Answer:
Function can be invoked by a giving a call to the function.

Question 117.
Give the purpose of return statement.
Answer:
It is used to return the value from the called function to the calling function.

Question 118.
What is a function prototype?
Answer:
The declaration of a function before it is used or called is known as function proto type.

Question 119.
Give the default return type of main() function.
Answer:
The default return type of main() function is int data type.

Question 120.
What is function parameter?
Answer:
Sometimes the calling function supplies some values to the called function. These are known as parameters.

Question 121.
What is the significance of void in function return type?
Answer:
A function that does not return a value is declared and defined as void.

KSEEB Solutions

Question 122.
Why are arguments used in functions?
Answer:
The arguments are the mechanism that carries values from calling function to called function.

Question 123.
What are the actual arguments?
Answer:
The data that is passed by the calling function as arguments/parameters is known as actual arguments, i.e., the arguments which are present at the time of function call.

Question 124.
What are formal arguments?
Answer:
Formal parameters or dummy parameters are the names of the argument/parameter in the function header of the called function.

Question 125.
What is global variable?
Answer:
A variable that is declared outside any function is known as a global variable.

Question 126.
What is the scope of global variable? .
Answer:
The scope of global variable is extended till the end of the program.

Question 127.
What are local variables?
Answer:
The variables declared within function block are called local variables.

Question 128.
What is the use of return statement in a function?
Answer:
The return statement sends both control and value back to the calling function.

Question 129.
Mention the limitation of return statement.
Answer:
The return statement return value is limited to a single value.

KSEEB Solutions

Question 130.
Write the syntax of function prototype.
Answer:
Returntypespecifier function name( datatype argument1, datatype argument2, ..);

Question 131.
Define structure.
Answer:
A structure is a collection of variable which can be same or different types.

Question 132.
What is the use of structures?
Answer:
Struct ures can be used to handle a group of logically related data items like register number, student name, subject marks, etc., under a single name.

Question 133.
What is the purpose of a struct keyword?
Answer:
It is the reserved or keyword used in structure definition.

Question 134.
What is structure tag?
Answer:
Structure tag is a name given by the programmer and used to identify the structure in future re-definitions.

Question 135.
What is the structure template?
Answer:
The list of all structure members is called a template.

Question 136.
What purpose does structure definition serve?
Answer:
The structure definition acts as a blueprint for the creation of variables.

KSEEB Solutions

Question 137.
How is a member of a structure accessed?
Answer:
The member of structure is accessed using dot (.) operator.

Question 138.
Write the declaration syntax for a structure variable.
Answer:
The general syntax for declaration of structure variable is Structurename variable;

2nd PUC Kannada Model Question Paper 3 with Answers

Students can Download 2nd PUC Kannada Model Question Paper 3 with Answers, Karnataka 2nd PUC Kannada Model Question Papers with Answers help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Kannada Model Question Paper 3 with Answers

2nd PUC Kannada Model Question Paper 3 with Answers 1
2nd PUC Kannada Model Question Paper 3 with Answers 2
2nd PUC Kannada Model Question Paper 3 with Answers 3
2nd PUC Kannada Model Question Paper 3 with Answers 4
2nd PUC Kannada Model Question Paper 3 with Answers 5

2nd PUC Kannada Model Question Paper 3 with Answers 6
2nd PUC Kannada Model Question Paper 3 with Answers 7
2nd PUC Kannada Model Question Paper 3 with Answers 8
2nd PUC Kannada Model Question Paper 3 with Answers 9
2nd PUC Kannada Model Question Paper 3 with Answers 10

2nd PUC Kannada Model Question Paper 3 with Answers 11
2nd PUC Kannada Model Question Paper 3 with Answers 13
2nd PUC Kannada Model Question Paper 3 with Answers 12
2nd PUC Kannada Model Question Paper 3 with Answers 14
2nd PUC Kannada Model Question Paper 3 with Answers 15

2nd PUC Computer Science Question Bank Chapter 12 Data File Handling

You can Download Chapter 12 Data File Handling Questions and Answers, Notes, 2nd PUC Computer Science Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Computer Science Question Bank Chapter 12 Data File Handling

2nd PUC Computer Science Data File Handling One Mark Questions and Answers

Question 1.
Which header file is required for file handling functions in C++?
Answer:
The header file required for file handling functions in C++ is <fstream.h>

Question 2.
What is stream?
Answer:
A stream is a sequence of characters that move from the source to the destination.

Question 3.
Name the streams generally used for file I/O.
Answer:
The streams generally used for file I/O is input stream, output stream, and error stream.

Question 4.
What are output streams?
Answer:
A sequence of characters that move from computer to an output device like monitor.

KSEEB Solutions

Question 5.
What are input streams?
Answer:
A sequence of characters that move from input device like keyboard to the computer.

Question 6.
Mention the methods of opening files within C++ program.
Answer:
The methods of opening file within C++ program

  • Opening a file using constructor
  • Opening a file using member function open()

Question 7.
Write the member functions belonging to fstream class.
Answer:
The member function belonging to fstream class is open() with default input mode.

Question 8.
What is ifstream class?
Answer:
This class supports input operations on files and is derived from istream class.

Question 9.
What is ofstream class?
Answer:
This class supports output operations on files and is derived from ostream class.

Question 10.
Write the member functions belonging to ofstream class.
Answer:
The member functions belonging to ofstream class are open () with default output mode and inherits put(), write(), tellp() and seekp() from ostream.

Question 11.
Write the member functions belonging to ifstream class.
Answer:
The member functions belonging to ifstream class are open() with defauit input mode and inherits get(), getiine(), read(), seekg() and tellg() from istream.

KSEEB Solutions

Question 12.
Name the stream classes supported by C++ for file input.
Answer:
The stream classes supported by C++ for file input are istream and ifstream.

Question 13.
Name the stream classes supported by C++ for output.
Answer:
The stream classes supported by C++ for output are ostream and ofstream.

Question 14.
Mention the file modes.
Answer:
The various file modes are ios::app, ios::ate, ios::binary, ios::in, ios:out etc.,

Question 15.
What is ios::in?
Answer:
The ios::in is a file mode that open the file in read-only mode.

Question 16.
What is ios::out?
Answer:
The ios::out is a file mode that open file for write-only mode.

Question 17.
Mention the types of files.
Answer:
The different types of files are binary files and text files.

Question 18.
What is text file?
Answer:
A text file that stores information in ASCII characters.

KSEEB Solutions

Question 19.
What is binary file?
Answer:
A binary file that contains information in the format as it is held in memory.

Question 20.
What is the use of write() function?
Answer:
The use of write() function is to write binary data to a file.

Question 21.
What is the use of writeln() function?
Answer:
Wrong question

Question 22.
What is the use of get() function?
Answer:
The get () function is used read a single character from the associated stream.

Question 23.
What is the use of put() function?
Answer:
The put() function is used to write a single character to the associated stream.

Question 24.
What is the use of getline() function?
Answer:
The use of getline() function is to read a whole line of text.

KSEEB Solutions

Question 25.
What is the use of read() function?
Answer:
The use of read() function is to read binary data from a file.

Question 26.
What is the use of seekp () function?
Answer:
The use of seekp() function to move the put pointer to a specified location from the beginning of a file.

Question 27.
What is the use of seekg() function?
Answer:
The use of seekg() function to move the get pointer to a specified location from the beginning of file.

Question 28.
What is the use of eof() function?
Answer:
The use of eof() function helps in detecting the end of file.

Question 29.
What is error handling function?
Answer:
Each bit such as eofbit, badbit, etc., are associated with the function that handles appropriate errors. Such function are called error handling functions. For example, eof() function.

2nd PUC Computer Science Data File Handling Two Mark Questions and Answers

Question 1.
What is stream? Name the stream generally used for file I/O.
Answer:
A stream is a sequence of characters that move from the source to the destination. The streams generally used for file I/O is input stream, output stream, and error stream.

Question 2.
What are input and output streams?
Answer:
The input streams are sequence of characters that move from input devices like a keyboard to the program/computer.
The output streams are sequence of characters that move from program/computer to an output device like a monitor.

KSEEB Solutions

Question 3.
Mention the methods of opening file within C++. Discuss anyone.
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 a file using constructor:

The syntax for opening file for output purpose only is ofstream obj(“filename”);
Example:
ofstream fout(“results.dat”);

Question 4.
Write the member functions belonging to fstream class.
Answer:
The member functions belonging to fstream class are constructor, open, is_open, close, and inherits get(), getline(), read(), seekg() and tellg() from istream, inherits put(), write() seekp() and tellp() from ostream.

Question 5.
Differentiate between ifstream class and ofstream class.
Answer:
The ifstream class supports input operations on file whereas ofstream class supports output operations on files.

KSEEB Solutions

Question 6.
Differentiate between read() and write ().
Answer:
The read() member function belongs to the class ifstream and used to read binary data from a file whereas write () member function belongs to the class ofstream and is used to write binary data to a file.

Question 7.
Differentiate between get() and getline().
Answer:
The get() member function belongs to the class ifstream and is used to read a single character from the associated stream whereas getline () function is a string I/O function that is used to read a whole line of text on text files.

Question 8.
Write the member functions belonging to ofstream class.
Answer:
The member functions belonging to ofstream class are open() with default output mode and inherits put(), write(), seekp() and tellp() from ostream.

Question 9.
Writ.e the member functions belonging to ifstream class.
Answer:
he member functions belonging to ifstream class are open() with default input mode and inherits get(), getline(), read(), seekg() and tellg() from istream.

KSEEB Solutions

Question 10.
Name the stream classes supported by C++ for file input and output.
Answer:
The stream classes supported by C++ for file input and output are fstreambase, ifstream, ofstream, fstream, and filebuf.

Question 11.
What are the advantages of saving data in binary form?
Answer:
The records in the database usually contain different data types. In such areas saving data in binary form helps to optimize storage space and file I/O would be faster when compared to text files.

2nd PUC Computer Science Data File Handling Three Mark Questions and Answers

Question 1.
Mention the methods of opening file within C++ program. Discuss.
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 a file using constructor:
The syntax for opening file for output purpose only is ofstream obj(“filename”);
where ofstream is a class and obj is a object of type ofstream and “filename” is any valid name of a file to be opened for output purpose only.

Opening file using open():
The syntax for opening file for output purpose only ofstream object.oper>(“filename”);
where ofstream is a class and object is of ofstream class type and filename is any. valid file to be opened for output purpose only.

Question 2.
Differentiate between ifstream class and ofstream class.
Answer:

  • The ifstream class supports input operations whereas ofstream class supports output operations on file.
  • The ifstream class inherits functions from istream whereas ofstream class inherits functions from ostream.
  • The inherited member functions of ifstream are get(), getline(), read(), seekg() and tellg() whereas ofstream member function are put(), write(), seekp() and tellp().

Question 3.
Differentiate between read() and write ().
Answer:

read() write()
belongs to the class ifstream belongs to the class ofstream
used to read binary data from a file used to write binary data to a file
Syntax: fin.read( (char *) &variable, sizeof(variable)); Syntax: fout.write( (char *) &variable, sizeof(variable));

Question 4.
Differentiate between get() and getline().
Answer:

get()

getline()

belongs to the class ifstream belongs to the class ifstream
to read a single character from the associated stream a string I/O function that is used to read a whole line of text to text files
Syntax: ifstream object.get(char); Syntax: fin.getline(buffer, SIZE);

Question 5.
Name the stream classes supported by C++ for file input and output.
Answer:
The stream classes supported by C++ for file input and output

  • fstreambase class provides facilities for file operations.
  • Ifstream class supports read operations and consists of open () with default input mode.
  • ofstream class supports output operations and consists of open() with default output mode.
  • fstream() class supports both input and output operations. It contains open() with default input mode.
  • filebuf class sets the file buffer to read and write.

KSEEB Solutions

Question 6.
Mention the types of file. Explain any one.
Answer:
The text file and binary file are the two types of files in C++.
Text file:
A text file also called as ASCII file is a stream of characters that can be sequentially processed in a forward direction by the computer. In text files, each line of text end with a EOL (End of line) character and each file ends with a special character called the EOF (End of file). The file can be edited using text editors like C++ editor, notepad, vi editor in UNIX.

Question 7.
What are the advantages of saving data in binary form and text form?
Answer:
The advantages of saving data in binary form (any three):

  • Stores the data in binary form
  • Files can be either processed sequentially or randomly
  • No delimiters are used for a line
  • No internal translation takes place
  • It takes less space to store data. For example, the integer 4564 occupies 2 bytes in memory.

The advantages of saving data in text form (any three):

  • Stores the data in ASCII characters
  • Files processed sequentially in the forward direction
  • Delimiter EOL is used for End of line and EOF is used to mark the end of file
  • Internal translation takes place during EOL and EOF
  • It takes more space to store data. For example, the integer 4564 occupies 4 bytes in memory.

2nd PUC Computer Science Data File Handling Five Mark Questions and Answers

Question 1.
What are input and output streams?
Answer:
The input streams are sequence of characters that move from input device like keyboard to the program/computer. The output streams are sequence of characters that move from program/computer to an output device like monitor.

The stream classes supported by C++ for file input and output
1. fstreambase:
class provides facilities for file operations and consists of open() and close() member functions. This is base class for fstream, ifstream and ofstream.

2. Ifstream:
class supports read operations and consists of open () with default input mode and inherits function get(), getline, read() , seekg(), tellg() from istream class defined inside iostream.h file.

3. ofstream:
class supports output operations and consists of open() with default output mode. It inherits the function put(), write(), seekp() and tellp() from ostream.

4. fstream():
class supports both input and output operations. It contains open() with default input mode and inherits all the functions from istream and ostream classes through iostream. filebuf class sets the file buffer to read and write.

KSEEB Solutions

Question 2.
What is the significance of fstream.h header file?
Answer:
The fstream.h header predefines a set or operations for handling files related to input and output. It defines certain classes that help to perform file input and output. For example, ifstream class links a file to the program for input and ofstream class links a file to the program for output and fstream classifies a file to the program for both input and output.

The file operations make use of streams as an interface between the programs and the files, A stream is a sequence of bytes and general name given to flow of data. Input stream and output stream represent different kind of data flow into the memory or out of the memory. The C++ provides ofstream class to write on files, ifstream class to read from files and fstream class to both read and write from/to file.

These classes are derived from fstreambase and from those declared in the header file ” iostream.h”. The classes ofstream, ifstream, and fstream are designed exclusively to manage the disk files and their declaration are present in the header file “fstream.h”. To make use of these classes, fstream.h is included in all the programs which handle disk files.

Question 3.
Mention the methods of opening file within C++. Discuss.
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 a file using constructor:
The syntax for opening file for output purpose only is

ofstream obj(“filename”);

where ofstream is a class and obj is a object of type ofstream and “filename” is any valid name of a file to be opened for output purpose only.
Example:

ofstream fout(“results.dat”);

Opening file using open():
The syntax for opening file for output purpose only

ofstream object.open(“filename”);

where ofstream is a class and object is of ofstream class type and filename is any valid file to be opened for output purpose only.
Example:

ofstream obj;
obj.open(“text.dat”);

Question 4.
Differential between ifstream class and ofstream class.
Answer:

  • The ifstream class supports input operations whereas ofstream class supports output operations on file.
  • The ifstream class inherits functions from istream whereas ofstream class inherits functions from ostream.
  • The inherited member functions of ifstream are get(), getline(), read(), seekg() and tellg() whereas ofstream member function are put(), write(), seekp() and tellp().

Question 5.
Differentiate between read() and write() with example.
Answer:

read() write()
belongs to the class ifstream belongs to the class ofstream
used to read binary data from a file used to write binary data to a file
Syntax: fin.read( (char *) &variable, sizeof(variable)); Syntax: fout.write( (char *) &variable, sizeof(variable));
Example: fin.read( (char *) &s, sizeof(s)); Example: fout.write ((char *) &s, sizeof(s));

Question 6.
Differentiate between get() and getline() with exmaple.
Answer:

get()

getline()

belongs to the class ifstream belongs to the class ifstream
to read a single character from the associated stream a string I/O function that is used to read a whole line of text to text files
Syntax: ifstream object.get(char); Syntax: fin.getline(buffer, SIZE);
Example: fin.get(ch); Example: fin.getline(book, SIZE);

KSEEB Solutions

Question 7.
Explain any three file modes.
Answer:
The file can be opened both for input and output operations using fstream class.
The syntax for opening a file with constructor is fstream object(“filename”, mode);
The syntax for opening a file with open() is fstream object.open(“filename”, mode);
Therefore, file can be opened using different modes. They are
ios::in opens file for reading only. For example, fstream fin(“te’xt.dat”, ios::in);
ios::out opens file for writing only. For example, fstream fout(“text.dat”, ios::out);
ios::app opens a file to append to end of file. For example, fstream
file.open(“text.dat”,ios::app);

Question 8.
Differentiate between ios::in and ios::out.
Answer:

ios::in mode ios::out mode
Opens file for reading only Open file for writing only
Ifstream is stream type Ofstream is stream type
Syntax: fstream

object.open(“filename”, ios::in);

Syntax: fstream

object.open(“filename”, ios::out);

For example, fstream fin.open(“text.dat”, ios::in); For example, fstream file.open(“text.dat”,ios::app);

2nd PUC Computer Science Question Bank Chapter 2 Boolean Algebra

You can Download Chapter 2 Boolean Algebra Questions and Answers, Notes, 2nd PUC Computer Science Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Computer Science Question Bank Chapter 2 Boolean Algebra

2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers

Question 1.
What is another name of Boolean algebra?
Answer:
Another name of Boolean algebra is ‘Switching Algebra’.

Question 2.
What do you understand by the term truth value?
Answer:
The result TRUE or FALSE of logical statement are called truth values.

Question 3.
What do you understand by the term truth function?
Answer:
The sentences which can be determined to be true or false are called truth function.

Question 4.
What do you meant by binary-valued variables?
Answer:
The variables that can store TRUE (1) or FALSE (0) truth values are called binary-valued variables.

KSEEB Solutions

Question 5.
What do you understand by logic function?
Answer:
The logic function is a compound statement that consists of a logic statement with logical operators like AND, OR and NOT.

Question 6.
Give examples for logic function.
Answer:
The examples for logic functions are
X NOT Y OR Z
Y AND X OR Z

Question 7.
What is meant by tautology and fallacy?
Answer:
If the result of any logical statement or expression is always TRUE is called Tautology and the result of any logical statement is always FALSE is called fallacy.

Question8.
Prove the 1+Y is a tautology and 0.Y is a fallacy.
Answer:

tautology fallacy
If Y=0, then 1 + 0=1 If Y = 1, then 0.1 = 0
If Y = 1, then 1+1 = 1 If Y = 0, then 0.0=0

Question 9.
Name the three logical operators.
Answer:
The three logical operators are AND, OR and NOT.

Question 10.
What is a truth table? What is its significance?
Answer:
Truth tables are a means of representing the results of a logic function using a table. They are constructed by defining all possible combinations of the inputs to a function and then calculating the output for each combination in turn.

Question 11.
What is NOT operator?
Answer:
The “NOT” is simply the opposite or complement of its original value.

Question 12.
Write Venn diagram for NOT operator.
Answer:
NOT – The first term but not the second is present.
fruit NOT apples
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 1

Question 13.
Write the truth table for NOT operation.
Answer:
The truth table for NOT operation.

X NOT X
0 1
1 0

Question 14.
What is OR operator?
Answer:
The OR is a disjunction operator and denotes logical addition.

Question 15.
Write Venn diagram for OR operator?
Answer:
OR – Any one of the terms are present (more than one term may be present.
fruit OR vegetables
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 2
fruit OR vegetables OR cereal
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 3

Question 16.
Write the truth table for OR operator.
Answer:

X Y OUTPUT X + Y
0 0 0
0 1 1
1 0 1
1 1 1

Question 17.
What is AND operator?
Answer:
The Logical AND operator is a conjunction operator and denotes logical multiplication.

Question 18.
Write Venn diagram for AND operator.
Answer:
rivers AND salinity.
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 4

Question 19.
Write the truth table for AND operation.
Answer:

X Y OUTPUT
X.Y
0 0 0
0 1 0
1 0 0
1 1 1

Question 20.
State idempotent law.
Answer:
When a variable combines with itself using OR or AND operator and produce the same variable as output is called idempotent law.
For example, X + X = X, X.X=X

Question 21.
Prove idempotent law using truth table.
Answer:
Idempotent law using truth table

X X OUTPUT
X. X
X + X
0 0 0 0
1 1 1 1

Question 22.
Draw logic diagram to represent idempotent law.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 5

Question 23.
State Involution law.
Answer:
This law states that the double complement of a variable gives the same variable.

Question 24.
Prove Involution law using truth table.
Answer:

Y Y OUTPUT
!(!Y)
0 1 0
1 O 1

Question 25.
Draw logic diagram to represent Involution law.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 6

Question 26.
State Complementarity law.
Answer:
The complementarity law states that a term ANDed with its complement equals 0, and a term ORed with its complement equals 1 (AA’ = 0, A+A’ = 1).

KSEEB Solutions

Question 27.
Prove Complementarity law using truth table.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 80

Question 28.
Draw logic diagram to represent Complementarity law.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 7

Question 29.
State Commutative law.
Answer:
The commutative law states that the order in which terms are written does not affect their value. For example, (AB = BA, A+B = B+A).

Question 30.
Prove Communicative law using truth table.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 81

Question 31.
Draw logic diagram to represent Commutative law.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 8

Question 32.
State Associative law.
Answer:
It is a simple equality statement i.e., A(BC) = ABC or A+(B+C) = A+B+C.

Question 33.
Prove Associative law using truth table.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 82

Question 34.
Draw logic diagram to represent Associative
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 9

Question 35.
State Distributive law.
Answer:
1. a term (A) ANDed with an parenthetical expression (B+C) equals that term ANDed with each term within the parenthesis: A . (B+C) = AB+AC;

2. a term (A) ORed with a parenthetical expression (B . C) equals that term ORed with each term within the parenthesis: A+(BC) = (A+B) . (A+C).

Question 36.
Prove Distributive law using truth table.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 83

Question 37.
Draw logic diagram to represent Distributive law.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 10
Question 38.
Prove that X+XY = X (Absorption law)
Answer:

X Y X.Y X+XY
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1

Question 39.
Prove that X(X+Y) = X (Absorption law).
Answer:

X Y X + Y X(X+Y)
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 1

Question 40.
Draw logic diagram to represent Absorption law.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 11

Question 41.
Prove that XY + X\(\hat{\mathbf{Y}}\) =X.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 12

Question 42.
Prove that (X+Y) (X+ \(\hat{\mathbf{Y}}\)) = X
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 13

Question 43.
Prove that A + \(\hat{\mathbf{A}}\)B = A + B
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 14

Question 44.
What is minterm?
Answer:
A minterm is a special product of literals, in which each input variable appears exactly once.

Question 45.
Find the minterm of AB + C.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 15

Question 46.
What is a maxterm?
Answer:
A maxterm is a sum of literals, in which each input variable appears exactly once.

Question 47.
Find the maxterm for X + \(\hat{\mathbf{Y}}\) + Z.
Answer:
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 16

Question 48.
What is the canonical form of Boolean expression?
Answer:
Boolean expression expressed as sum of minterms or product of max terms are called canonical form.

KSEEB Solutions

Question 49.
Give an example for a Boolean expression in the sum of minterms form.
Answer:
The example for boolean expression is the sum of minterms form is
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 17

Question 50.
Give an example for a Boolean expression in the product of max terms form.
Answer:
The example for boolean expression in the product of max terms form is
2nd PUC Computer Science Boolean Algebra One Mark Questions and Answers 18

2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers

Question 1.
Prove algebraically that (X+Y) (X+Z) = X + YZ
Answer:
LHS: = (X+Y) (X+Z)
= XX + XZ + XY + YZ
= X + XZ + XY + YZ
= X + (1 + Z +Y) YZ
= X + YZ
= RHS

Question 2.
Prove algebraically that X+xY = X + Y
Answer:
LHS : = X + \(\bar{x}\) . X + Y
= 1 . X + Y
= X + Y

Question 3.
Use duality theorem to derive another Boolean relation from: A + \(\bar{A}\) B = A+B
Answer:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 19
Question 4.
What would be complement of the following:
Answer:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 20

Question 5.
What are the fundamental products for each of the input words?
Answer:
ABCD = 0010, ABCD =0110, ABCD = 1110. Write SOP expression.
The SOP expression for ABCD = 0010
\(\bar{A}\)\(\bar{B}\) C\(\bar{D}\) = m2
The SOP expression for ABCD =0110,
\(\bar{A}\) BC\(\bar{D}\) = m6
The SOP expression for ABCD = 1110
ABC\(\bar{D}\) = M14

KSEEB Solutions

Question 6.
A truth table has output 1 for each of these input;
ABCD = 0011, ABCD =0101, ABCD = 10000, what are the fundamental products and write minterm expression.
Answer:
Fundamental product of
ABCD = 0011 is \(\bar{A}\) \(\bar{B}\) C D = m3
ABCD = 0101 \(\bar{A}\) B \(\bar{C}\) D = m5
ABCD = 1000 is A \(\bar{B}\) \(\bar{C}\) \(\bar{D}\) = m8
minterm expression is
f(A,B,C,D) = Σ(3, 5, 8)
or
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 21

Question 7.
Construct a Boolean function of three variables X, Y and Z that has an output 1 when exactly two of X, Y and Z are having values 0, and an output 0 in all other cases.
Answer:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 22

Question 8.
Construct a truth table for three variables A, B and C that will have an output 1 when XYZ = 100, XYZ = 101, XYZ = 110 and XYZ = 111. Write the Boolean expression for logic network in the SOP form.
Answer:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 23

Question 9.
Convert the following expressions to canonical Product-of-Sum form:
a) (A + C) (C + D)
b) A(B + C) (\(\bar{C}\) + \(\bar{D}\))
c) (X + Y) (Y + Z) (X + Z)
Answer:
Canonical product of sum of
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 24
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 25
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 26

Question 10.
Convert the following expressions to canonical Sum-of-Product form:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 27
Answer:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 28
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 29
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 30

Question 11.
Draw Karnaugh maps for the following expressions:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 31
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 32
Answer:
Karnaugh maps for \(\bar{x} \bar{y}+\bar{x} y\)
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 33
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 34

Question 12.
Draw a general K-map for four variables A, B, C, and D.
Answer:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 35

Question 13.
Given the expression in four variables, draw the k-map for the function:

  1. m2 + m3 + m7 + m9 + m11 + m13
  2. m0 + m2 + m4 + m8 + m9 + m10 +m11+ m12 + m13

Answer:
1. m2 + m3 + m7 + m9 + m11 + m13
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 36
2. m0 + m2 + m4 + m8 + m9 + m10 + m11 + m12 + m13
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 37

Question 14.
Draw the k-map for the function in three variables given below.

  1. m0 + m2 + m4 + m6 + m7
  2. m1 + m2 + m3 + m5 + m7

Answer:
1. m0 + m2 + m4 + m6 + m7
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 38
2. m1 + m2 + m3 + m5 + m7
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 39

Question 15.
Write SOP expression corresponding to the function F in the following truth table and draw the logic diagram (use OR and AND gates)
Answer:
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 85

SOP Expression.
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 40
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 41
2nd PUC Computer Science Boolean Algebra Two Marks Questions and Answers 42

2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers

Question 1.
State and prove any three theorems of boolean algebra.
Answer:
1. Idempotance law:
This law states that when a variable is combined with itself using OR or AND operator, the output is the same variable.
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 43

2. Involution Law:
The complement of a variable is complemented again then we get the same variable.
X” = X
If X =0, then O’ = 1′ = 0
If X=1, then 1′ = 0′ = 1.

KSEEB Solutions

3. Complementary Law:
The variable is combined with its complement and ORed and ANDed. If ORed, it always gives True (Tautology). If ANDed, then it gives False as the result always.
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 44

Question 2.
State and prove associative law of addition and multiplication. This law states that

  1. A + (B + C) = (A + B) + C
  2. A. (B .C) = (A .B)

Proof:
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 45
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 46

Question 3.
State and prove De Morgan’s theorems by the method of perfect induction.
Answer:
1. De Morgan’s First Theorem:
When the OR sum of two variables is inverted, this is the same as inverting each variable individually and then ANDing these inverted variables.
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 47

2. De Morgan’s Second Theorem:
When the AND product of two variables is inverted, this is the same as inverting each variable individually and then ORing them.
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 48
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 49

Question 4.
Obtain the minterm expression for the Boolean function F = A+B’C. the minterm expression for the Boolean function F = A+B’C is
Answer:
= A + B’C …….(1)
The first term A is missing two variables B and C, therefore
A = A (B + B’) = AB + AB’ = AB (C+C’) + AB’ (C+C’)
= ABC + ABC’ + AB’C + AB’C’ …….(2)
The second term B’C is missing variable A, therefore
B’C = B’C (A + A’)
= AB’C + A’B’C …….(3)
Now, Substitute (2) and (3) in (1) we get
ABC + ABC’ + AB’C + AB’C’ + AB’C + A’B’C.

Question 5.
Explain with an example how to express a Boolean function in its sum of product form.
Answer:
The logical sum of two or more logical product terms is known as sum of products expression. SOP is an ORing of ofANDedvariables. The boolean expression containing all the input variables either in complemented or un complemented form in each of the product term is known as canonical SOP expression and each term is called minterm.

For example, express the product of sum from the boolean function f(x,y). For example, express the product of sum from the boolean function F(X, Y) and the truth table for which is given below:
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 50
Now by adding minterm for the output 1’s, we get the desired sum of product expression which is X’Y’ + XY.

KSEEB Solutions

Question 6.
Explain with an example how to express a Boolean function in its product of sum form.
Answer:
The logical product of two or more logical sum terms is known as a product of sums expression. POS is an ANDing of ORedvariables. The boolean expression containing all the input variables either in complemented or un complemented form in each of the sum term is known as a canonical POS expression and each term is called maxterm. For example, express the product of sum from the boolean function F(X, Y) and the truth table for which is given below:

X Y F Maxterm
0 0 1 X+Y
0 1 0 X+Y’
1 0 0 X’+Y
1 1 1 X’+Y’

Now by multiplying max terms for the output 0’s, we get the desired product of sums expression which is (X+Y1) (X’+Y).

Question 7.
Construct a truth table f r minterms and max terms for three variables and designate the terms.
Answer:
The truth table for minterms for three variables
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 51
The truth table for max terms for three variables
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 52

Question 8.
Using basic gates, construct a logic circuit for the Boolean expression (X’+Y) (X+Z) (Y+Z)
Answer:
Logic circuit for the Boolean expression (\(\bar{x} \)+Y) (X + Z) (Y + Z)
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 53

Question 9.
Simplify the following Boolean expressions and draw logic circuit diagrams of the simplified expressions using only NAND gates.
Answer:
Logic circuit diagram of the simplified expressions using only NAND gates.
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 54
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 55
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 56
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 57

Question 10.
For a four-variable map in w,x,y, and z draw the sub cubes for

  1. w x\(\bar{Y} \)
  2. w x
  3. x y \(\bar{Z} \) and
  4. y

Answer:
For a four-variable mao in w,x,y and z, the sub cubes for

  1. wx\(\bar{Y} \)
  2. w x
  3. x y\(\bar{Z} \) and
  4. y are as follows

2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 58

Question 11.
Convert the following product-of-sums form into its corresponding sum-of-products form using truth table. F(x,y,z) = π(2,4,6,7)
Answer:
POS form conversion into its SOP form using truth table is F(x, y, z) = Σ(2, 4, 6, 7)
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 59
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 60

Question 12.

  1. Reduce the following Boolean expression to the simplest form: A. [B+C.(AB + AC)
  2. Given : F(X,Y,Z) – E(l,3,7) then prove that F'(x,y,z) = π(0,2,4,5,6)

Answer:
1.
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 61

2. Given F(x, y, z) = Σ(1, 3, 7)
2nd PUC Computer Science Boolean Algebra Three Marks Questions and Answers 62From the above, the minterm list is
F(x, y, z) = Σ(1, 3, 7)
and the maxterm list is F'(x, y, z) = π(0, 2, 4, 5, 6)

2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers

Question 1.
Using maps, simplify the following expressions in four variables W, X, Y, and Z.

  1. m1 + m3 + m5 + m6 + m7 + m9 + m11 + m13
  2. m0 + m2 + m4 + m8 + m9 + m10 + m11 + m12 + m13.

Answer:
1. m1 + m3 + m5 + m6 + m7 + m9 + m11 + m13
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 63
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 64
2. m0 +m2 +m4 +m8 +m9 +m10 + m11 + m12 +m13
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 65

Question 2.
Using maps, simplify the following expressions in four variables W, X, Y, and Z.

  1. m1 + m3 + m5 + m6 + m7 + m9 + m11 + m13
  2. m0 + m2 + m4 + m8 + m9 + m10 + m11 + m12 + m13.

Answer:
1. m1 + m3 + m5 + m6 + m7 + m9 + m11 + m13
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 66
2. m0 + m2 + m4 + m8 + m9 + m10 + m11 + m12 + m13.
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 67
Question 3.
For the Boolean function F and F’ in the truth table, find the following:
(a) List the minterms of the functions F and F’.
(b) Express F and F’ in the sum of minterms in algebraic form.
(c) Simplify the functions to an expression with a minimum number of literals.
Answer:
3. a) Minterms of the functions F
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 68

KSEEB Solutions

Question 4.
State and prove De Morgan’s theorems algebraically.
Answer:
1. De Morgan’s First Theorem:
When the OR sum of two variables is inverted, this is the same as inverting each variable individually and then ANDing these inverted variables. This is written in the born of
Boolean expression as \(\overline{x+y}=\bar{x} \cdot y\)
Proof:
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 69

2. De Morgan’s 2nd Theorem
When the AND product of two variables is inverted, this is the same as inverting each variable individually and then ORing them \(\overline{x. y}=\bar{x}+\bar{y}\)
To prove, we again use complementarity law
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 70

Question 5.
Find the complement of F = X + YZ, then show that F.F’ = 0 and F + F’ = 1.
Answer:
F = X + YZ
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 71

Question 6.

  1. State the two Absorption laws of Boolean algebra. Verify using the truth table.
  2. Simplify using the laws of Boolean algebra. At each step state clearly the law used for simplification. F = x.y + x.z + x.y.z.

Answer:
1. The two Absorption law of Boolean algebra are

  • A +AB = A
  • A (A + B) = A

Verification using truth table
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 72

2. Simplification using Boolean algebra.
F = x.y+ x.z+ x.y.z
= x(1 + y + z + yz)
= x(1) – using property of additon 1 + x = 1
= x – property of multiplication x.1 = x

Question 7.
Given the Boolean function F(x, y, z) = Σ (0, 2, 4, 5, 6). Reduce it using the Karnuagh map method.
Answer:
F (x, y, z) = Σ (0, 2, 4, 5, 6)
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 73

Question 8.
(a) State the two complement properties of Boolean algebra. Verify using the truth tables.
(b) \(x \cdot(\overline{y z}+y z)\)
Answer:
a) The two complement properties of Boolean algebra are
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 74
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 75

Question 9.
Given the Boolean function F{A, B, C, D) = Σ(5, 6, 7, 8, 9,10,14). Use Karnaugh’s map to reduce the function F using SOP form. Write a logic gate diagram for the reduced SOP expression.
Answer:
F(A, B, C, D) = Σ(5, 6, 7, 8, 9,10,14)
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 76
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 77

Question 10.
Given: F(A, B, C, D) = (0, 2,4, 6,8,10,14). Use Karnaugh map to reduce the function F using POS form. Write a logic gate diagram for the reduced POS expression.
Answer:
Given F(A, B, C, D) = (0, 2, 4, 6, 8,10,14)
k-map using POS form
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 78
2nd PUC Computer Science Boolean Algebra Five Marks Questions and Answers 79

2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements

You can Download Chapter 4 Analysis of Financial Statements Questions and Answers, Notes, 2nd PUC Accountancy Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements

2nd PUC Analysis of Financial Statements NCERT Textbook Questions and Answers

2nd PUC Analysis of Financial Statements Short Answer Questions With Answers

Question 1.
List the techniques of Financial Statement Analysis.
Answer:
The following are the commonly used techniques of Financial Statement analysis:

  • Comparative Financial Statements
  • Common Size Financial Statements
  • Trend Analysis
  • Ratio Analysis
  • Cash Flow Statement
  • Fund Flow Statement

Question 2.
Distinguish between Vertical and Horizontal Analysis of financial data.
Answer:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 1

KSEEB Solutions

Question 3.
Explain the meaning of Analysis and Interpretation.
Answer:
Analysis and Interpretation refers to a systematic and critical examination of the financial statements. It not only establishes cause and e Tect relationship among the various items of the financial statements but also presents the financial data in a proper manner. The main purpose of Analysis and Interpretation is to present the financial data in such a manner that is easily understandable and self-explanatory. This not only helps the accounting users to assess the fi nancial performance of the business over a period of time but also enables them in decision making and policy and financial designing process.
Bring out the importance of Financial Analysis The following are the importance of Financial Analysis:

  • It helps in evaluating the profit earning capacity and financial feasibility of a business.
  • It helps in assessing the long-term solvency of the business.
  • It helps in evaluating the relative financial status of a firm in comparison to other competitive firms.
  • It assists management in decision making process, drafting various plans and also in establishing an effective controlling system.

Question 4.
What are Comparative Financial Statements?
Answer:
Those financial statements that enable intra-firm and inter-firm comparisons of financial statements over a period of time are called Comparative Financial Statements. In other words, these statements help the accounting users to evaluate and assess the financial progress in the relative terms. These statements express the absolute figures, absolute change and the percentage change in the financial items over a period of time.

Question 5.
What do you mean by Common Size Statements?
Answer:
These statements depict the relationship between various items of financial statements and some common items in percentage terms. In other words, various items of Trading and Profit and Loss Account such as Cost of Goods Sold, Non-Operating Incomes and Expenses are expressed in terms of percentage of Net Sales. On the other hand, different items of Balance Sheet such as Fixed Assets, Current Assets, Share Capital etc. are expressed in terms of percentage of Total of Balance Sheet. These percentage figures are easily comparable with that of the previous years’ and with that of the figures of other firms in the same industry as well.

2nd PUC Analysis of Financial Statements Long Answer Questions With Answers

Question 1.
Describe the different techniques of financial analysis and explain the limitations of financial analysis.
Answer:
The various techniques used in financial analysis are as follows:
Comparative Statements: These statements depict the figures of two or more accounting years simultaneously that help to access the profitability and financial position of a business. The Comparative Statements help us in analysing the trend of the financial position of the business. These statements also enable us to undertake various types of comparisons like inter¬firm comparisons and intra-firm comparisons. It presents the change in the financial items both in absolute as well as percentage terms. Therefore, these statements help in measuring the efficiency of the business in relative terms. The analyses based on these statements are known as Horizontal Analysis.

Common Size Statements: These statements depict the relationship between various items of financial statements and some common items (like Net Sales and the Total of Balance Sheet) in percentage terms. In other words, various items of Trading and Profit and Loss Account such as Cost of Goods Sold, Non-Operating Incomes and Expenses are expressed in terms of percentage ofNet Sales. On the other hand, different items of Balance Sheet such as Fixed Assets,

Current Assets, Share Capital, etc. are expressed in terms of percentage of Total of Balance Sheet. These percentage figures are easily comparable with that of the previous years’ (i.e. inter-firm comparison) and with that of the figures of other firms in the same industry (i.e. inter-firm comparison) as well. The analyses based on these statements are commonly known as Vertical Analysis.

Trend Analysis: This analysis undertakes the study of trend in the financial positions and the operating performance of a business over a series of successive years. In this technique, a particular year is assumed to be the base year and the figures of all other years are expressed in percentage terms of the base year’s figures. These trends (or the percentage figures) not only helps in assessing the operational efficiency and the financial position of the business but also helps in detecting the problems and inefficiencies.

Ratio Analysis: This technique depicts the relationship between various items of Balance Sheet and the Income Statements. It helps in ascertaining the profitability, operational efficiency, solvency, etc of a firm.. The analysis expresses financial items in terms of percentage, fraction, proportion and as number of times. It enables budgetary controls by assessing the qualitative relationship among different financial variables. This analysis provides vital information to different accounting users regarding the financial position, viability and performance of a firm. It also facilitates decision making and policy designing process.

Cash Flow Analysis: This analysis is presented in the form of a statement showing inflows and outflows of cash and cash equivalents from operating, investing and financing activities of a company during a particular period of time. It helps in analysing the reasons of receipts and payments in cash and change in the cash balances during an accounting year in a company.

Limitations of Financial Analysis
The limitations of Financial Analysis are:
Ignores Changes in the Price level: The financial analysis fails to capture the change in price level. The figures of different years are taken on nominal values and not in real terms (i.e. not taking price change into considerations).

Misleading and Wrong Information: The financial analysis fails to reveal the change in the accounting procedures and practices. Consequently they may provide wrong and misleading information.

Interim and Final Picture: The financial analysis presents only the interim report and ‘ thereby provides incomplete information. They fail to provide the final and holistic picture.

KSEEB Solutions

Ignores Qualitative and Non-monetary Aspects: The financial analysis reveals only the monetary aspects. In other words, these analyses consider only that information that can be expressed only in monetary terms. These analyses fail to disclose managerial efficiency, growth prospects, and other non-operational efficiency of a business.

Accounting Concepts and Conventions: The financial analysis are based an accounting concepts and conventions. Therefore, the analysis and conclusions based on such analyses may not be reliable. For example, the analysis considers only the book-value of various items (i.e. according to the Going Concept) and consequently ignores the present market value of those items. Hence, the analysis may not be realistic.

Involves Personal Biasness: The financial analysis reflects the personal biasness and personal value judgments of the accountants and clerks involved. There are different techniques used by different personnel for charging depreciation (original cost or written-down value method) and also for inventory valuation. The use of different techniques by different people reduces the effectiveness of the financial analysis.

Unsuitable for Comparisons: Due to the involvement of personal value judgment, personal biasness and use of different techniques by different accountant, various types of comparisons such as inter-firm and intra-firm comparisons may not be possible and reliable.

Question 2.
Explain the usefulness of trend percentages in interpretation of financial performance of a company.
Answer:
The Trend Analysis presents each financial item in percentage terms for each year. These . Trend Analyses not only help the accounting users to assess the financial performance of the business but also assist them to form an opinion about various tendencies and predict the future trend of the business.
Usefulness and Importance of Trend Analysis
The following are the various importance of Trend Analysis:
1. Assists in forecasting: The trends provided by Trend Analysis help the accounting users to forecast the future trend of the business.

2. Percentage Terms: The trends are expressed in percentage terms. Analysing the percentage figures is easy and also less time consuming.

3. User Friendly: As the trends are expressed in percentage figures, so it is the most popular financial analysis to analyse the financial performance and operational efficiency of the company. In other weirds, one needs not to have an in-depth and sophisticated
knowledge of accounting in order to analyse these percentage trends.

4. Presents a Broader Picture: The trend analysis presents a broader picture about the financial performance, viability and operational efficiency of a business. Generally, companies prefer to present their financial data for a period of 5 or 10 years in forms of percentage trends, whereas the other techniques of Financial Analysis lack this popularity.

Question 3.
What is the importance of comparative statements? Illustrate your answer with particular reference to comparative income statement.
Answer:
The following are the importance of Comparative Statements.
1. Simple Presentation: The Comparative Statements present the financial data in a simpler form. Moreover, the year-wise data of the same items are presented side-by¬side, which not only makes the presentation clear but also enables easy comparisons (both intra-firm and inter-firm) conclusive.

2. Easy for Drawing Conclusion: The presentation of comparative statement is so effective that it enables the analyst to draw conclusion quickly and easily and that too without any ambiguity

3. Easy to Forecast: The comparative analysis of profitability and operational efficiency of a business over a period of time helps in analysing the trend and also assists the management to forecast and draft various future plans and policy measures accordingly.

4. Easy Detection of Problems: By comparing the financial data of two or more years, the financial management can easily detect the problems. While comparing the data, some items may have increased while others have decreased or remained constant. The comparative analysis not only enables the management in ‘locating the problems but also helps them to put various budgetary controls and corrective measures to check whether the current performance is aligned with that of the planned targets.

From the following information prepare comparative statement of profit and loss for the year ending 31st March, 2013 and 31st March, 2014 of Ritu Co. Ltd:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 2

Comparative statement of Profit and Loss ofRitu Co. Ltd, for the year ending 31st March, 2014 and 31st March, 2015
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 3

KSEEB Solutions

Question 4.
What do you understand by analysis and interpretation of financial statements? Discuss their importance.
Answer:
Financial Analysis has great importance to various accounting users on various matters. Income Statements, Balance Sheets and other financial data provide information about expenses and sources of income, profit or loss and also helps in assessing the financial position of a business. These financial data are not useful until they are analysed. There are various tools and methods such as Ratio Analysis, Cash Flow Statements that make the financial data to cater varying needs of various accounting users.
The following are the reasons that advocate in favour of Financial Analysis:

  • It helps in evaluating the profit earning capacity and financial feasibility of a business.
  • It helps in assessing the long-term solvency of the business.
  • It helps in evaluating the relative financial status of a firm in comparison to other competitive firms.
  • It assists management in decision making process, drafting various plans and also in establishing an effective controlling system.

Question 5.
Explain how common size statements are prepared giving an example.
Answer:
The two Common Size Statements that are most commonly prepared are as follows.

  • Common Size Balance Sheet
  • Common Size Income Statements

Common Size Statement is prepared in a columnar form for analysis. In a Common Size Statement each item of the financial statements is compared to a common item. The analyses based on these statements are commonly known as Vertical Analysis.
The following are the columns prepared in a Common Size Statement.

  • Particulars Column: This column shows the various financial items under their respective heads.
  • Amount-Columns: These columns depict the amount of each item, sub-totals and the gross total of a particular year.
  • Percentage or Ratio Columns: These columns show the proportion of each item to the common item either in terms of percentage or ratio.

The Balance Sheet of Sun Ltd. and Moon Ltd., are given as follows :

2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 4
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 5
Prepare Common Size Balance Sheet for two companies:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 6
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 7

KSEEB Solutions
Step 1: Title of the Common Size Statement, i.e. ‘Common Size Balance Sheet’ is written on the top of the statement.
Step 2: In the ‘Particulars’ column, the various items of the Balance Sheet are shown under the headings of‘Assets’ and ‘Liabilities’.
Step 3: In the ‘Amount’ column, amount of the items are shown in the ‘Year’ column to which they belong
Step 4: The Assets and Liabilities are totaled and are shown separately for each year.
Step 5: In the ‘Percentage’ column, the percentage of each item in comparison to the Total of Balance Sheet are shown. The percentage change in each item is calculated by the help of the following formula.
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 8
The following are the statement of Profit and Loss of a Company for the year ending 31.3.2009 and 31.3.2010. Prepare common size statement of Profit and Loss.
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 9
Common Size Statement of Profit and Loss for the year ending 31st March 2009 and 31st March 2010.
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 10

2nd PUC Analysis of Financial Statements Numerical Questions

Question 1.
Following are the balance sheets of Alpha Ltd., as at March 31, 2014 and 2015:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 11
You are required to prepare a Comparative Balance Sheet.
Answer:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 12
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 13

KSEEB Solutions

Question 2.
Following are the Balance sheets of Beta Ltd. at March 31, 2018
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 14
Answer:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 15
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 16

Question 3.
Prepare Comparitive Statement of profit and loss from the following information:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 17
Answer:
Comparative Income statement for the year ended 31.03.2017 and 31.03.2018
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 18

KSEEB Solutions

Working Notes
1. Calculation of net sales
Net sales = Cost of Goods sold + cross profit – sales returns.
Or
Net sales = Purchases + Manufacturing expenses + change in Inventory + Cross profit sales returns.
Net sales (2013) = 80,000 + 20,000 + 30,000 + 90,000 – 4,000 = 2,16,000
Net sales (2014) – 1,40.000 + 50,000 – 60,000 – 30,000 – 8,000 = 9000

2. Calculations of Finance Cost
Finance cost = interest on short term loans + interest in 10% Debentures.
Finance Cost (2014) = 20,000 + 1,000 = 21,000 Finance cost (2015) = 20,000 + 2,000 = 22,000

3. Calculations of Other expenses
Other expense = freight outward + carriage outword + loss in sale of car
Other expenses (2013) = 10,000 – 10.000 + 60,000 = 80,000
Other Expenses (2014) =20,000 – 20,000 + 90,000 = 1,30,000

Question 4.
Prepare Comparative Statement of Profit and Loss from the following information:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 19
Answer:
Comparative Income statement for the year ended 31.03.2017 and 31.03.2018
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 20
Working Notes:
L Calculation of net Purchase
Net sales = Cash purchases + credit purchases – Purchase returns
2013 = 1,20,000 + 1,50,000 – 4 000 = ₹ 2,66,000 .
2014 = 40,000 + 60,000 – 6000 = ₹ 94,000

2. Calculation finance cost
Finance cost = interest on bank overdraft + interest in debentures
2013 = 5000 + 20,000 = 25,000
2014 = 0 + 20,000 = 20,000

Question 5.
Prepare a Common size statement of profit and loss of Shefali Ltd. with the help of following information:
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 21
Answer:
Common size Statement of Profit and Loss
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 22
Working Notes
1. Calculation of other expenses indirect expenses = % of cross profit.
2015 = 6,00,000 +50% × 25% = 75,000
2016 = 8,00,000 + 45% × 25% = 90,000

Question 6.
Prepare a Common Size balance sheet from the following balance sheet of Aditya Ltd., and Anjali Ltd.
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 23
Answer:
Common size Balance Sheet as on 31/3/15
2nd PUC Accountancy Question Bank Chapter 4 Analysis of Financial Statements - 24

KSEEB Solutions

error: Content is protected !!