You are on page 1of 22

INSTITUTE OF AERONAUTICAL ENGINEERING

(Autonomous)
Dundigal, Hyderabad - 500 043

OBJECT ORIENTED PROGRAMMING


TUTORIAL QUESTION BANK

1 Department COMPUTER SCIENCE AND ENGINEERING


2 Course code ACSD01
3 Course Title OBJECT ORIENTED PROGRAMMING
4 Class / Semester I/I
5 Regulation BT-23
6 Course Coordinator Dr. J Sirisha Devi

COURSE OBJECTIVES:
The students will try to learn:

I The fundamental concepts and principles of object-oriented programming in


high-level programming languages.
II Advanced concepts for developing well-structured and efficient programs that
involve complex data structures, numerical computations, or domain-specific
operations.
III The design and implementation of features such as inheritance, polymorphism, and
encapsulation for tackling complex problems and creating well-organized, modular,
and maintainable code.
IV The usage of input/output interfaces to transmit and receive data to solve
real-time computing problems.

COURSE OUTCOMES:
After successful completion of the course, students should be able to:

CO 1 Interpret the features of object-oriented programming languages, comparison,


and evolution of programming languages.
CO 2 Model the real-world scenario using class diagrams and exhibit communication
between objects.
CO 3 Estimate the need for special functions for data initialization.
CO 4 Outline the features of object-oriented programming for binding the attributes
and behavior of a real-world entity.
CO 5 Use the concepts of streams and files that enable data management to enhance
programming skills.
CO 6 Develop contemporary solutions to software design problems using
object-oriented principles.

QUESTION BANK:
Q.No QUESTION Taxonomy How does this subsume CO’s
the level
MODULE I
OBJECT-ORIENTED CONCEPTS
PART A-PROBLEM SOLVING AND CRITICAL THINKING QUESTIONS
1 What is the need for object Understand Recall the concept of object CO 1
oriented programming? oriented programming to
justify the need for OOP.
2 What are the limitations of Remember CO 1
OOP?
3 Where do we use OOPS in Understand Recall the concept of object CO 1
real life? oriented programming to
justify the use of OOP.
4 What is top down process of Remember CO 1
reading?
5 What are the benefits of Understand Recall the concept of CO 1
top-down processing? programming and
summarize the benefits of
top-down processing.
6 How do we use top-down Understand Recall the concept of top- CO 1
processing everyday? down processing to mention
its usage in everday life.
7 What is the bottom up Understand Recall the concept of CO 1
approach in language programming and mention
teaching? the uses of bottom up
approach in teaching.
8 What is an example of Understand Recall the concept of CO 1
bottom-up learning? botton-up processing to give
few examples.
9 Define abstraction in Remember CO 1
software in general.

Page 2
10 How to achieve data Understand Recall the concept of data CO 1
abstraction in OOP? abstraction to narrate the
process of data abstraction.
PART-B LONG ANSWER QUESTIONS
1 Discuss about the objects Understand Recall the concept of obejct CO 1
and legacy systems. oriented programming to
explain objects and legacy
systems.
2 Differentiate between Understand Recall the concepts of CO 1
procedure-oriented procedure and oriented
programming and programming and object
object-oriented oriented programming.
programming.
3 Explain the features of Understand Recall the concept of OOP CO 1
Object-oriented and explain its features.
programming.
4 What are the applications Understand Recall the concept of OOP CO 1
of Object-oriented and explain its features.
programming?
5 Explain top-down and Remember Recall the concepts of top CO 1
bottom-up approaches of down and bottom up
problem solving. approaches.
6 Explain the mechanism of Remember CO 1
data abstraction.
7 What are the advantages Understand Recall the concepts of object CO 1
and disadvantages of oriented programming to
Object-oriented explain its advantage and
programming? disadvantages.
8 Differentiate between Understand Recall the concepts of top CO 1
top-down approaches and down and bottom up
bottom-up approaches. approaches to differentitate
them.
9 How object oriented Understand Recall the concepts of CO 1
programming differs from objects to understand
object based programming benefits of OOP
language? Discuss the
benefits of OOP.
10 Explain how procedural Understand Recall the concept of data CO 1
abstraction enhances code abstraction to enhance code
readability and reusability. readability and reusability.

Page 3
11 Explore the concept of Remember CO 1
encapsulation as an
abstraction mechanism.
12 How does encapsulation Understand Recall the concept of CO 1
facilitate information hiding encapsulation to explain
and data protection in about information hiding
object-oriented and data protection.
programming?
13 Explain any two features of Understand Recall the features of object CO 1
object-oriented oriented programming.
programming with an
example.
14 Discuss the advantages and Understand Recall the concepts of top CO 1
disadvantages of top-down down and bottom up
and bottom-up approaches. approaches to explain their
advantages and
disadvantages.
15 Explain the various Understand Recall the concept of object CO 1
applications of Object oriented programming to
Oriented Programming explain its applications.
using an example.
16 Illustrate the benefits of Understand Recall the concepts of CO 1
Object-Oriented objects to understand
Programming. benefits of OOP
17 What is the purpose of the Understand Recall the concept of object CO 1
object-oriented oriented programming to
programming and its need justify its need in the
in the current industry? current industry.
18 Define abstraction. What Remember CO 1
are the different layers of
abstraction?
19 Explain the various forms of Remember CO 1
abstraction.
20 Discuss the advantages and Understand Recall the concept of data CO 1
challenges of designing abstraction to explain its
software with a hierarchical challenges in designing
structure of abstraction software.
layers.
PART-C SHORT ANSWER QUESTIONS
1 What is a legacy system? Remember CO 1

Page 4
2 What are the characteristics Understand Recall the characteristics of CO 1
of legacy systems? Name a legacy systems
few legacy systems.
3 Define procedure-oriented Remember CO 1
programming (POP).
4 Define object-oriented Remember CO 1
programming (OOP).
5 What are the four Remember CO 1
cornerstones of OOP?
6 What is platform Remember CO 1
independency?
7 Define abstraction. Remember CO 1
8 Define datatype and its Remember CO 1
types.
9 List the 8 primitive Remember CO 1
datatypes.
10 What are syntax rules? Understand Recall the concept of CO 1
programming to explain
syntax rules.
11 Define data hiding. Remember CO 1
12 Define object data. Remember CO 1
13 What is object behaviors? Remember CO 1
14 Define method. Remember CO 1
15 Define attribute. Remember CO 1
16 Define interface. Remember CO 1
17 Define data abstraction. Remember CO 1
18 Define process abstraction. Remember CO 1
19 What is information hiding? Remember CO 1
20 What is a message? Remember CO 1
MODULE II
CLASSES AND OBJECTS
PART-A PROBLEM SOLVING AND CRITICAL THINKING QUESTIONS
1 How much memory does a Understand Recall the concept of class CO 2
class occupy? and memory allocation.

Page 5
2 is it always necessary to Understand Recall the concept of classes CO 2
create objects from class? and objects.
3 Are class and structure the Understand Recall the concept of class CO 2
same? If not, what is the and structure
difference between a class
and a structure?
4 Can a class extend itself? Understand Recall the concept of classes CO 2
and its properties.
5 What is the difference Understand Recall the concept of classes CO 2
between a class and object? and objects.
6 What is the need of access Understand Recall the concept of access CO 2
specifiers? specifiers.
7 What will happen if a class Understand Recall the concept of classes CO 2
extends two interfaces and and its properties.
they both have a method
with same name and
signature?
8 Which access specifier Understand Recall the concept of access CO 2
should be used in a class specifiers and types of
where the instances can’t be access specifiers.
created?
9 On which specifier’s data, Understand Recall the concept of classes CO 2
does the size of a class’s and access specifiers.
object depend?
10 What is the difference Understand Recall the concepts of CO 2
between local variable and members of a class and local
data member? variables.
PART-B LONG ANSWER QUESTIONS
1 Define class and object with Understand Recall the concepts of CO 2
suitable example. How classes, objects, member
members of class can be variables and memeber
accessed? functions.
2 What is a method? How a Understand Recall the concept of CO 2
method is defined? methods.
3 What are access specifiers Understand Recall the concept of access CO 2
and what is their specifiers, modes of access
significance in OOP? specifiers.

Page 6
4 What is the difference Understand Recall the concept of access CO 2
between public, private and specifiers, modes of access
protected access modifiers? specifiers.
5 Create a real scenario where Apply Recall the concept of static CO 2
static data members are data members and its usage
useful. Explain with for problem solving.
suitable example.
6 Explain the scope of access Understand Recall the concept of access CO 2
specifiers. specifiers, modes of access
specifiers.
7 Draw a class diagram for Apply Recall the concepts of CO 2
hospital management classes and class diagram.
system which consists of
classes, their attributes,
operations (or methods),
and relationship among
objects. The main classes
are hospitals, patients,
doctors, nurses,
appointments, and
medicines.
8 Draw a class diagram for Apply Recall the concepts of CO 2
Library Management classes and class diagram.
System. This diagram must
describe the structure of the
system by showing the
system’s classes, their
attributes, operations (or
methods), and the
relationships among objects
9 What is the major use of Apply Recall the concepts of static CO 2
data members and member data members and static
functions as static? Explain member functions.
it with an example.
10 In object-oriented Understand Recall the concepts of CO 2
programming, what is the private members and public
difference between accessing members and their scope of
a class’s public member and accessibility.
a private member?
11 Explain object behaviors Understand Recall the concept of CO 2
with examples. objects and their behavior.

Page 7
12 Explain the basic elements Analyze Recall the concepts of CO 2
of a class diagram with an classes and class diagrams.
example.
13 Why static members are Understand Recall the concepts of static CO 2
used in a class, and what data members, static
advantages do they offer in member functions, and
terms of memory and memory allocation.
performance?
14 Explain the difference Understand Recall the concepts of CO 2
between a static method accessing static methods.
and an instance method in
terms of access and usage.
15 In object-oriented Understand Recall the concepts of static CO 2
programming, what is the data members and static
significance of the static member functions.
keyword when applied to
members and methods?
16 Give an example of a Apply Recall the concepts of static CO 2
real-world problem where data members and static
static members and member functions.
methods are useful for
solving the problem
efficiently.
17 What are some potential Understand Recall the concepts of static CO 2
drawbacks or limitations of data members, and static
using static members and member functions.
methods, and when should
you be cautious about their
use?
18 What is memory allocation, Understand Recall the concept of static CO 2
and why is it important in and dynamic memory
computer systems? allocation.
19 Describe the concept of Understand Recall the concept of CO 2
dynamic memory allocation dynamic memory allocation.
and its advantages in
program flexibility.
20 What is virtual memory, Understand Recall the concept of virtual CO 2
and how does it extend memory.
physical memory allocation
to improve system
performance?

Page 8
PART-C SHORT ANSWER QUESTIONS
1 What is a class? Remember CO 2
2 What is an object? Remember CO 2
3 What is an interface? Remember CO 2
4 What is method hiding? Remember CO 2
5 How many types of access Understand Recall the concept of access CO 2
specifiers are provided in specifiers.
OOP?
6 What is an instance of a Remember CO 2
class?
7 Define class diagram. Remember CO 2
8 List out the vital Understand Recall the concept of class CO 2
components of a class diagrams.
diagram.
9 What is the purpose of a Understand Recall the concept of class CO 2
class diagram? diagrams.
10 What are the benefits of Understand Recall the concept of class CO 2
class diagrams? diagrams.
11 Define public access Remember CO 2
specifier.
12 Define private access Remember CO 2
specifier.
13 Define protected access Remember CO 2
specifier.
14 WHat is the difference Understand Recall the concept of access CO 2
between default and specifiers.
protected access specifier?
15 Define aggregation. Remember CO 2
16 Define generalization. Remember CO 2
17 Define association. Remember CO 2
18 What is a static member? Remember CO 2
19 What is a static method? Remember CO 2
20 What is the need for static Understand Recall the concept of static CO 2
members? members.
MODULE III

Page 9
SPECIAL MEMBER FUNCTIONS AND OVERLOADING
PART A-PROBLEM SOLVING AND CRITICAL THINKING QUESTIONS
1 Can we call sub class Understand Recall the concept of CO 3
constructor from super class constructors.
constructor?
2 What happens if you keep a Understand Recall the concept of CO 3
return type for a constructors.
constructor?
3 When do we need Understand Recall the concept of CO 3
constructor overloading? constructors and
overloading.
4 How a no – argument Understand Recall the concept of CO 3
constructor is different from constructors.
default Constructor
5 “An overloaded function Understand Recall the concept of CO 3
appears to perform different overlaoding.
activities depending the
kind of data send to it”
Justify the statement with
appropriate example.
6 If class B inherits class A Understand Recall the concept of friend CO 3
privately. And class B has a functions and inheritance.
friend function. Will the
friend function be able to
access the private member
of class A?
7 What happens if you do not Understand Recall the concept of CO 3
provide any constructor to a constructors.
class?
8 If a class has all the private Understand Recall the concept of CO 3
members, which specifier constructors.
will be used for its implicit
constructor?
9 How many friend functions Understand Recall the concept of friend CO 3
can a class have? functions.
10 Does friend function violate Understand Recall the concept of friend CO 3
encapsulation? function and encapsulation.
PART-B LONG ANSWER QUESTIONS

Page 10
1 What is constructor? Understand Recall the concept of CO 3
Explain the concept of constructors and types of
default and default copy constructors.
with suitable example.
2 How are constructors Analyze Recall the concept of CO 3
different from member constructors and member
functions? Explain with an functions to explain the
example. difference between them
with an example.
3 Depict the difference Understand Recall the concept of CO 3
between private and public constructors and types of
derivation. Explain derived constructors.
class constructor with
suitable example.
4 Explain the default action Understand Recall the concepts of copy CO 3
of the copy constructor. constructor and overloading.
Give a suitable example
that demonstrates the
technique of overloading the
copy constructor.
5 Write short notes on: a) Understand Recall the concept of data CO 3
Early binding, b) late binding.
binding.
6 Explain types of constructor Understand Recall the concept of CO 3
with example. constructors and types of
constructors.
7 What is copy constructor? Understand Recall the concept of copy CO 3
When it is used implicitly constructor.
for what purpose?
8 What is the difference Understand Recall the concept of CO 3
between copy constructor constructors and types of
and default constructor? constructors.
9 Describe unary operator Apply Recall the concept of CO 3
overloading along with operator overloading.
syntax and example
10 Describe binary operator Apply Recall the concept of CO 3
overloading along with operator overloading.
syntax and example

Page 11
11 What is overloading of an Understand Recall the concept of CO 3
operator? When it is operator overloading.
necessary to overload an
operator?
12 Differentiate between the Understand Recall the concept of CO 3
concepts of overloading and overloading and overriding
overriding with an example. to differentiate between
them.
13 What is the difference Understand Recall the concept of CO 3
between constructor overloading.
overloading and operator
overloading?
14 Explain is constructor Understand Recall the concepts of copy CO 3
overloading with an constructor and overloading.
example.
15 Define static data members Understand Recall the concept of static CO 3
and explain with an members.
example.
16 What is the use of operator Analyze Recall the concept of CO 3
overloading? How to operator overloading.
overload post and
pre-increment operators?
17 Differentiate between Understand Recall the concept of CO 3
method overloading and overloading and overriding
method overriding. to differentiate between
them.
18 What is the concept of Understand Recall the concept of friend CO 3
friend function? How it functions.
violates the data hiding
principle? Justify with
example.
19 List out the guidelines that Understand Recall the concept of friend CO 3
should be followed while functions.
using friend functions.
20 What are friend classes? Understand Recall the concept of friend CO 3
Explain the advantages of classes.
using friend classes.
PART-C SHORT ANSWER QUESTIONS
1 Define a constructor. Remember CO 3
2 Define constructor chaining. Remember CO 3

Page 12
3 What is No-arg constructor? Understand Recall the concept of CO 3
constructors.
4 Define a copy constructor? Remember CO 3
5 What are distinguishing Understand Recall the concept of copy CO 3
characteristics of copy constructors.
constructors?
6 What is a dynamic Understand Recall the concept of CO 3
constructor? constructors.
7 What is dynamic Understand Recall the concept of CO 3
initialization? initialization of variables
and objects.
8 Define destructor? Remember CO 3
9 What is the use of Understand Recall the concept of CO 3
destructors? destructors.
10 Define method overloading. Remember CO 3
11 Define method overriding. Remember CO 3
12 What are the different types Understand Recall the concept of CO 3
of constructors? constructors.
13 What are distinguishing Understand Recall the concept of CO 3
characteristics of default constructors and types of
constructors? constructors.
14 What are distinguishing Understand Recall the concept of CO 3
characteristics of overloaded constructors and types of
constructors? constructors.
15 What is operator Remember CO 3
overloading?
16 What is unary operator Understand Recall the concept of CO 3
overloading? operator overloading.
17 Name the binary operators Understand Recall the concept of CO 3
that can be overloaded. operator overloading.
18 Define friend function. Remember CO 3
19 What are the characteristics Understand Recall the concept of friend CO 3
of friend functions? functions.
20 What is the difference Understand Recall the concept of friend CO 3
between friend function and functions and friend class.
friend class in OOP?

Page 13
MODULE IV
INHERITANCE AND POLYMORPHISM
PART A- PROBLEM SOLVING AND CRITICAL THINKING QUESTIONS
1 What are the limitations of Understand Recall the concept of CO 4
inheritance? inheritance.
2 How is an abstract class Understand Recall the concept of CO 4
different from an interface? abstract class.
3 Why do we need to use Understand Recall the concept of CO 4
inheritance? inheritance.
4 How will you prove that the Understand Recall the concept of CO 4
features of superclass are inheritance.
inherited in subclass?
5 Will a constructor and Understand Recall the concepts of CO 4
instance initialization blocks inheritance and
inherited to subclass? constructors.
6 Are static members Understand Recall the concept of static CO 4
inherited to subclass? members.
7 What is the order of calling Understand Recall the concepts of CO 4
constructors in case of inheritance and
inheritance? constructors.
8 How will you restrict a Understand Recall the concept of CO 4
member of a class from inheritance.
inheriting its subclass?
9 What happens if both Understand Recall the concept of CO 4
superclass and subclass have inheritance.
a field with the same name?
10 Can you call the base class Understand Recall the concept of CO 4
method without creating an inheritance.
instance?
PART-B LONG ANSWER QUESTIONS
1 Briefly explain types of Understand Recall the concept of CO 4
inheritance used in object inheritance in object
oriented Programming. oriented programming.
2 Differentiate between Understand Recall the concepts of CO 4
multiple inheritance and mulitple inheritance and
multilevel inheritance. multilevel inheritance.

Page 14
3 What is the difference Understand Recall the concepts of CO 4
between inheritance and inheritance and
encapsulation? encapsulation.
4 Discuss the difference Understand Recall the concepts of CO 4
between inheritance and inheritance and abstraction.
abstraction with real time
examples.
5 What is the difference Understand Recall the concepts of CO 4
between polymorphism and inheritance and
inheritance? polymorphism.
6 How composition differs Understand Recall the concept of CO 4
from inheritance in OOP? composition.
Explain with examples.
7 How dynamic binding is Understand Recall the concept of CO 4
achieved in polymorphism? polymorphism.
8 What is the difference Understand Recall the basic properties CO 4
between ”is-a” and ”has-a” of OOP
relationship?
9 Explain polymorphism Understand Recall the concept of CO 4
briefly. Write down the polymorphism and its types.
roles of various types of
polymorphism.
10 How can we achieve Understand Recall the concept of CO 4
dynamic polymorphism polymorphism and its types.
briefly? Explain with
example.
11 What are the types of Understand Recall the concept of CO 4
Polymorphism? polymorphism and its types.
12 Explain Compile-time Understand Recall the concept of CO 4
Polymorphism with polymorphism and its types.
example.
13 Explain overloading unary Understand Recall the concept of CO 4
and binary operators with overloading.
suitable examples.
14 What are the differences Understand Recall the various ways to CO 4
between ‘this’ and ‘super’ inherit constructor
keyword? properties to its subclass.
15 What are the rules to be Understand Recall the concept of CO 4
followed while overriding a overriding.
method?

Page 15
16 Explain public, private and Understand Recall the concept of access CO 4
protected access specifiers specifiers and inheritance.
and show their visibility
when they are inherited as
public, private and
protected.
17 What do you mean by Analyze Recall the concept of CO 4
constructors in derived constructors and
classes? If a constructor inheritance.
function is defined for
derived and base class, then
which constructor function
gets executed first, explain
with example.
18 What do you mean by Understand Recall the various types of CO 4
hybrid inheritance? Explain inheritance.
how to remove ambiguity in
the case of hybrid
inheritance?
19 Explain different visibility Understand Recall the concepts of CO 4
modes with example. inheritance and access
specifiers.
20 How do the properties of Analyze Recall the concepts of CO 4
following two derived class inheritance and access
differ: i. class D1: private specifiers.
B, public C
. . . . . . . . . . . . . . . . . . . . . . . . .; ii.
class D2: protected B,
private C
. . . . . . . . . . . . . . . . . . . . . . . . .;
PART-C SHORT ANSWER QUESTIONS
1 Define inheritance. Remember CO 4
2 Define base class. Remember CO 4
3 Define derived class. Remember CO 4
4 What is an abstract class? Remember CO 4
5 What is IS-A relationship? Remember CO 4
6 What is a subclass? Understand Recall the concept of CO 4
inheritance
7 Define a superclass? Understand Recall the concept of CO 4
inheritance

Page 16
8 What is hybrid inheritance? Understand Recall the concept of CO 4
inheritance
9 What is hierarchical Understand Recall the concept of CO 4
inheritance? inheritance
10 What is polymorphism? Remember CO 4
11 What is static Understand Recall the concept of CO 4
polymorphism? polymorphism
12 What is dynamic Understand Recall the concept of CO 4
polymorphism? polymorphism
13 List out the operators which Understand Recall the concept of CO 4
cannot be overloaded. operator overloading
14 Define virtual function. Remember CO 4
15 What is a pure virtual Understand Recall the concept of virtual CO 4
function? functions.
16 Differentiate between a class Understand Recall the concept of class. CO 4
and a method.
17 Can we pass an object of a Understand Recall the concept of CO 4
subclass to a method inheritance.
expecting an object of the
super class?
18 What is the purpose of the Understand Recall the concept of CO 4
”super” keyword? constructor and inheritance.
19 Define virtual base class. Remember CO 4
20 What is ”final” keyword for Remember CO 4
method?
MODULE V
CONSOLE I/O AND WORKING FILES
PART A-PROBLEM SOLVING AND CRITICAL THINKING QUESTIONS)
1 Draw console stream class Understand Recall the concept of CO 5
hierarchy and explain its streams.
members.
2 What is a stream class for Understand Recall the concept of CO 5
console operations? streams and its operations.

Page 17
3 Compare and contrast batch Understand Recall the concept of data CO 5
processing and stream processing.
processing. When would
you choose one over the
other for data processing
tasks?
4 Classify the methods of Understand Recall the concept of I/O CO 5
unformatted console operations.
input/output operations
with example.
5 Is it possible to dynamically Understand Recall the concept of I/O CO 5
change the formatting of operations formatting.
console output during
program execution? How
might you achieve this, and
what use cases could benefit
from such dynamic
formatting?
6 Are there any challenges or Understand Recall the concepts of CO 5
considerations related to manipulators.
using manipulators for
console output when
targeting multiple operating
systems or platforms? How
can you ensure consistent
formatting across
platforms?
7 What is a file structure in Understand Recall the concept of files. CO 5
operating systems?
8 How does the use of Understand Recall the concepts of CO 5
manipulators impact the manipulators.
readability and
user-friendliness of console
output? Can you provide
examples where well-chosen
manipulators significantly
improve output
presentation?
9 Explain the primary file Understand Recall the concept of file CO 5
operations involved in file operations.
handling, such as opening,
reading, writing, and
appending to files.

Page 18
10 What is an InputStream? Understand Recall the concept of CO 5
Outline the methods defined streams.
by InputStream.
PART-B LONG ANSWER QUESTIONS
1 Write a short note on Understand Recall the concept of CO 5
Character Stream classes. streams and types of
streams.
2 Write short notes on: a) Understand Recall the concept of access CO 5
Manipulators, b) protected specifiers and manipulators.
access specifier
3 How is character I/O Understand Recall the formats of I/O CO 5
different from binary I/O? operations on character and
Explain with examples. binary files.
4 List and explain in brief Understand Recall the functions to work CO 5
various functions required with random access files.
for random access file
operations.
5 What are manipulators? Understand Recall the concept of CO 5
How can you create your manipulators.
own manipluators? Explain
with an example.
6 Explain how files can be Understand Recall the concept of CO 5
processed and data can be manipulators.
manipulated during file I/O
operations.
7 Compare and contrast Understand Recall the operations on CO 5
appending data to a file files.
with overwriting the entire
file. When would you
choose one approach over
the other?
8 Describe the significance of Understand Recall the operations on CO 5
closing files after completing files.
file I/O operations. What
can happen if files are not
properly closed?
9 Discuss the concept of file Understand Recall the concept of file CO 5
locking and its importance locking.
in multi-threaded or
multi-process applications.

Page 19
10 Discuss the distinction Understand Recall the concept of CO 5
between character streams streams and I/O formatting.
and byte streams in
unformatted I/O. When
would you choose one over
the other?
11 Describe the concept of Understand Recall the concept of CO 5
stream buffering in streams and I/O formatting.
unformatted I/O operations.
How does buffering impact
the performance of I/O
operations?
12 Explain the fundamental Understand Recall the concept of I/O CO 5
difference between formatting.
unformatted I/O and
formatted I/O operations in
programming. How do these
two approaches impact the
way data is read from and
written to input and output
streams?
13 In the context of Understand Recall the concept of CO 5
unformatted I/O, discuss unformatted I/O operations.
the importance of
documentation and code
readability.
14 How can streams be used Understand Recall the concept of CO 5
securely, especially when streams.
dealing with untrusted data
sources? What precautions
should be taken to prevent
security vulnerabilities
related to streams?
15 What are some popular Understand Recall the concept of CO 5
libraries or frameworks for streams and its applications.
stream processing, and how
do they simplify the
development of
stream-based applications?

Page 20
16 Describe the concept of Understand Recall the concept of data CO 5
stream abstraction layers in abstraction and streams.
programming. Provide a
hierarchy or diagram that
illustrates the relationship
between different levels of
stream classes.
17 Explore the concept of Understand Recall the concept of CO 5
dynamic formatting with manipulators.
manipulators. How can
manipulators be applied
dynamically during program
execution based on user
input or other runtime
conditions?
18 Explain how manipulators Understand Recall the concept of CO 5
can be useful for formatting command line arguments
output in command-line
applications.
19 Discuss the potential Understand Recall the concept of CO 5
consequences of failing to command line arguments
manage resources properly.
What happens if you forget
to close a stream after using
it?
20 Explain the concept of Understand Recall the concept of CO 5
command line arguments command line arguments
and their role in passing
information to a program
from the command line.
PART-C SHORT ANSWER QUESTIONS
1 Define stream. Remember CO 5
2 What is the function of Understand Recall the concept of CO 5
console? console I/O.
3 What are the two types of Understand Recall the concept of CO 5
I/O stream? streams.
4 How character streams are Understand Recall the concept of CO 5
defined? streams.
5 What is the difference Understand Recall the concept of CO 5
between a file and a stream? streams and files.

Page 21
6 What is the difference Understand Recall the concept of CO 5
between stream and console console I/O and stream.
I/O?
7 What is an unformatted Understand Recall the concept of CO 5
I/O operations? unformatted I/O operations.
8 What are the manipulators Remember CO 5
in OOP?
9 What is an output Remember CO 5
manipulator?
10 What is the purpose of Understand Recall the concept of CO 5
manipulators? manipulators.
11 What are manipulative Understand Recall the concept of CO 5
methods? manipulators.
12 How do you manage Understand Recall the concept of CO 5
manipulators? manipulators.
13 What is a file in OOP? Remember CO 5
14 What are the file access Understand Recall the concept of access CO 5
right? rights on files.
15 What are the basic Understand Recall the concept of files CO 5
operations on a file? and its operations.
16 Compare unformatted data Understand Recall the concept of CO 5
and formatted data. unformatted and formatted
I/O operations.
17 Which method can be used Understand Recall the operations on CO 5
to open a file in file files.
handling?
18 How many types of files are Understand Recall the types of files. CO 5
there in file handling?
19 What is command line Remember CO 5
argument in OOP?
20 What are the types of Understand Recall the concept of CO 5
command line arguments? command line arguments.

Signature of Course Coordinator HOD CSE


Dr. J Sirisha Devi, Associate Professor

Page 22

You might also like