Sub Code: 16EC564 (OOPS WITH C++) Question Bank 2020
Module
– I
Beginning
with C++ and its features: What is C++, Application and structure of C++ program,
Different data types, variables, Different operators, Expressions, Operator
Overloading and control structures in C++.
1) Differences between OOPS and POP. (6MARKS)Jan-2018
2) What is Variable? Mention its rules
associated with declaration of variable. (8MARKS)
Jan-18
3) Explain Enum with an example. (6MARKS)Jan-18
4) What is dynamic Memory allocation?
Explain with a help of code snippet the usage of new and delete operators in
C++. (6MARKS)Jan-2018/17
5) Define Pre-processor Directives state
the purpose of the following C++ pre-processor directives. a. #include
b.#define c.#ifndef (8MARKS)Jan-2018/17
6) What are data types in c++ list of the
built in and derived data types with example. (6MARKS)
Jan-18.
7) With syntax and example give the
control for switch and while statement. (7MARKS)
Jan-18
8) Give the example for relational,
logical &bitwise expression available in c++ (3MARKS)
Jan-18
9) What is Object oriented Programming?
How it is different from Procedure oriented programming?
10) How are data and functions organized
in OOPS?
11) Distinguish between
i) Objects and classes.
ii) Data abstraction and
Encapsulation.
iii) Inheritance and Polymorphism.
iv) Dynamic Binding and Message
passing.
12) Differences between C and C++.
13) Describe the major parts of C++
Program.
14) How does namespace standard statement
perform? Explain its function and usage.
15) Write a program to read 3 numbers and
display larger number on the screen.
16) Write a program that asks for
temperature in Celsius and converts it to Fahrenheit.
17) What are Manipulators? Explain the
usage of same with an example.
18) Write a program to calculate the
Simple Interest using SI=PTR/100.
19) Write a program to find the value of
cos(x),sin(x) series
20) Write a program to find roots of
quadratic equation.
21) Write a program to count the number of
vowels in a given string using switch statement.
Module-2
Functions,
classes and Objects: Functions, Inline function, function
overloading, friend and virtual functions, Specifying a class, C++ program with
a class, arrays within a class, memory allocation to objects, array of objects,
members, pointers to members and member functions.
1) What
is Function? Mention the advantages of Function. (8MARKS) Jan/18
2) Generate
a result sheet for all students who have secured honours in ECE branch with the
following details (8MARKS)
Jan/18
a)Roll number
b)Name
c)Sem
d)Branch
e)Institute
f)Marks in different subjects
g)Grade
3) What
is Friend function? How is friend function different from a member function?
(8MARKS) Jan/18
4) Write
a Inline Function to find the largest of two numbers. (8MARKS) Jan/18/July17
5) Explain
Call by value and Call by Reference parameter passing method with an example. (8MARKS)
July17
6) What
is Inline Functions? Explain with an example. What are the limitations of
Inline Functions? (6MARKS) July/17
7) Explain
the different types of function parameter passing technique. (8MARKS)July17
8) Write
a C++ program to find largest element in an array using functions. (6MARKS)
July 17
9) Write
a a Recursive function to find Factorial of a given number.(4MARkS) Jan17
10) Define
Recursion. Write a recursive Program to find GCD of two numbers.
11) Write
a Recursive function to find nth Fibonacci number
12) Write
a function to read a matrix of size mxn from the keyboard and display the same
of the screen
13) Write
a program for calculating ex=1+x+x2+x3+…….xn
14) Explain
the definition of class definition, taking an example. Also explain the
importance of access specifiers.
15) Describe the difference between class and
object with an example program.
16) Describe
the 3 access specifiers used to implement information hiding.
17) How
is memory allocated to a class and its objects?
18) What
is the significance of this pointer?
19) Write
a menu driven program for addition,subtraction display result of two distances
using member function and friend function.
20) Write
a menu driven program for deposition,withdrawl,and display balance for the bank
account of a particular customer.
Module-3
Constructors,
Destructors and Operator overloading:
Constructors, Multiple constructors in a class, Copy constructor, Dynamic
constructor, Destructors, Defining operator overloading, Overloading Unary and
binary operators, Manipulation of strings using operators.
1) Explain
the different types of constructors, with examples. (8MARKS) Jan/18
2) Distinguish
between a constructor and Destructor. Develop a program to implement overloaded
constructors and show the corresponding output (8MARKS) Jan/18.
3) List
the operators that cannot be overloaded. (2MARKS)Jan/18
4) Write
a C++ program to include two data member height & base using a constructor
to set height and base with area and display as member function to calculate
area of the triangle (8MARKS) Jan/18
5) Write
a C++ program to implement a class called STRING. In the class, develop a
copy constructor to copy one string to
another. Write the supporting main() that uses the copy constructor to copy one
string to another. (8MARKS)Jan/18
6) Develop
a class called Employee containing the following data members: Emp_Number,
Emp_name, Emp_Designation and
Emp_salary. Provide an appropriate set of constructors for the class and write
the supporting main(). (8MARKS) Jan/18
7) When
is destructor member function invoked in a class?
8) Explain
the purpose of operator overloading. Write a C++ program to add two complex
numbers by overloading the operator +. (4MARKS) July/17
9) Explain
the following with examples. (6MARKS)
July/17
a) Overloading operators ++ and—
b) Overloading Relational
operator >
c) Overloading assignment
operator =
10) What
is Constructor? How to invoke a Constructor?
11) What
are the rules for declaration of the Constructor?
12) Explain
the Manipulation of Strings using Operators
13) Write
a C++ program to include a class time which has hours, minutes and seconds as
data, a constructor without arguments to initialise data to 0,a constructor
with three arguments to be assisted to hours, minutes ,and seconds respectively
,a constructor with one float arguments and converts it to hours, minutes and
seconds, display and destructor function.
Module-4
Inheritance,
Pointers, Virtual Functions, Polymorphism:
Derived Classes, Single, multilevel, multiple Inheritance, Pointers to objects
and derived classes, this pointer, Virtual and pure virtual
Functions.
1) How
is polymorphism achieved in OOPS with virtual functions explain with an example
(8MARKS)Jan/18
2) What
is Inheritance? Briefly explain public, private, and protected inheritance with
an example. (8MARKS)Jan/18
3) Explain
single and Multilevel Inheritance. (8MARKS)Jan/18
4) Explain
‘this’ pointer. with an example (6MARKS)Jan/18
5) What
are pure virtual functions (2MARKS)Jan18/July 17
6) Example
multiple inheritance with constructor and destructor operation executed with
example (6MARKS)July/17
7) Explain
all types of Inheritance with examples.
8) What
is pointer? How to declare a pointer?
9) What
are the operations possible with pointer variables?
10) Explain
pointers and single dimensional array with an example.
11) Explain
pointers and two-dimensional array with an example.
12) Explain
pointers and multi-dimensional array with an example.
13) Explain
array of pointers with an example.
14) Explain
pointer as Function arguments.
15) Explain
pointer to objects with an example.
16) With
a program explain pointer to derived class.
17) Explain
the Concept of Virtual Function with an example.
\
Module-5
Streams and Working with files:C++ streams and stream
classes,formatted and unformatted I/O operations, Output with
manipulators,Classes for file stream operations, opening and closing a file,
EOF.
1) Explain C++ Streams. List all the
streams classes used for file operations (8MARKS)Jan/18
2) Explain put() and get() ,get
line(),write() functions (8MARKS)Jan/18.
3) What are file input and output
streams? write a program for writing and reading the data from a file using
streams classes (8MARKS)Jan/18
4) With
an example i)explain the syntax for opening and closing of file operation
ii).explain the end of file operator (8MARKS)Jan/18
5) Write
a note an base class & derived class (4MARKS)Jan/17
6) Explain getline() and write()
functions.
7) Explain with examples Formatted
Console I/O operations.
8) Explain with examples different Output
with Manipulators.
9) What is the purpose of
ifstream,fstream and ofstream?
10) Explain the different modes in which a
file can be opened.
Post a Comment