Tuesday 4 October 2016

OOP Theory Questions for Reference !


OOP Question Bank for Theory Exam
Unit I
Sr. No
Questions
1
When would you choose to use C rather than C++?
2
List the features of Object oriented programming
3
What is Constructor and Destructor, explain using program 
4
What is class and object. Differentiate between class and object 
5
What is class abstraction
6
Write a program which uses default constructor, parameterized constructer and destructor.   
7
Compare  1) Procedure oriented programming Vs Object oriented programming 
8
What is the use of  ‘this’ pointer
9
Compare and contrast dynamic memory allocation and deallocation operators new, new [], delete and delete [].
10
Define   class Number which has inline function mult ( ) and  cube () for calculating the multiplication of 2 double numbers given and cube of the integer number given

Unit-II
Sr. No
Questions
1
Explain Polymorphism. 
2
When do we overload the functions and when do we override
3
Explain Function overloading and operator overloading
4
Write a program to overload unary operator using friend functions.
5
Write a program to overload binary operator using friend functions.
6
Explain what is type casting, Implicit type casting and explicit type casting
7
Explain information hiding in C++.
8
Explain public, private and protected keywords using program
9
What are type of inheritance
10
What is an abstract class, how it is different from concrete class.
11
What are nested classes, how to access the members of nested classes. Explain using example
12
Define a class string and use overloaded == operator to compare two strings.
13
Write a program to overload insertion (<<) and extraction (>>) operator in C++
14
Explain need of operator overloading. Write C++ program to demonstrate use of unary operator overloading
Unit III
Sr. No
Questions
1
Explain static variables and static member function in C++ using program
2
What are virtual functions
3
Explain Virtual destructor
4
What is difference between pointer and references. Explain using program
5
What is Pointer, Smart Pointer and Shared Pointer. Explain using diagram and program
6
What is significance of Static keyword in programming
7
Explain the dangling pointer
8
What is ‘this’ pointer
9
What is the significance of friend keyword. Explain using program
10

Write a program to Find the sum of an array Arr by passing an array to a function using pointer

11
How smart pointers avoids the problem of memory leak
12
Explain virtual base class and virtual function with example

Unit-IV
Sr. No
Questions
1
What is generic programming? How it is implemented in C++
2
Explain What is Function template and Class template using program
3
What I exceptional handling
4
Explain try, catch and throw mechanism of C++ exception al handling
5
What is stack unwinding
6
Explain class template using multiple parameters. Write a program in C++
7
Explain exception handling mechanism in C++? Write a program in C++ to handle “divide by zero” exception.
8
What is the purpose of Iterator? Elaborate forward, bidirectional and random-access iterators with suitable examples
9
What do you mean by rethrowing exceptions
10
Compare associative containers Vs  Sequence Containers Vs Derived containers with example of each




Unit-V
Sr. No
Questions
1
What is a Stream? explain types of Streams available in C++
2
What are cin and cout ? explain iostream.
3
What are file pointers? explain various function used in file pointers
4
Explain what is fstream, ifstream and ofstream with help of example
5
What are various functions which are used to manipulate file pointers. Explain using examples.
6
What are stream errors, flags for setting and getting an error
7
Explain Command line arguments in C++. Write program to explain the same
8
Write a program to overload insertion (<<) and extraction(>>) operator in C++
9
Write a program Using the C++ file input and output class with open(), get(), close() etc methods for opening, reading from and writing to a file

10

Write a The C++ file input and output program: using seekg(), tellg(), read() etc member functions.


11

Write a program using the open(), eof() and getline() member functions to open and read a file content line by line



Unit-VI
Sr. No
Questions
1
What is STL ? list different types of STL containers.
2
What is a stack ? How it is implemented using STL
3
What is an iterator ? what are types of Iterators
4
Write a program to implement Map using STL
5
What is container? List the container classes in C++. Explain any one of them using program
6
Use minimum 8 functions of vector STL. Write a program to explain the same
7
Use minimum 8 functions of Deque STL. Write a program to explain the same
8
What is the STL? Why should a C++ programmer be interested in the STL? What is the design philosophy of the STL? What are the major components of the STL?
9
Write a program to implement Map using STL
10
Use minimum 8 functions of vector STL. Write a program to explain the same                               

18 comments:

  1. http://javalearner1.blogspot.com

    visit to learn more

    ReplyDelete
  2. Looking for C++ Classes In Pune lotus it hub is best C++ Institute

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Very informative and impressive post you have written, this is quite interesting and i have went through it completely, an upgraded information is shared, keep sharing such valuable information.
    get more: Object Oriented Programming

    ReplyDelete
  5. If we talk about printers first name comes in our head is Brother Printers, for latest and updated Drivers for Brother go to the Following Sites.

    solutions.brother.com/windows
    solutions.brother.com/windows
    solutions.brother.com/windows
    solutions.brother.com/windows

    ReplyDelete

  6. Hi dear,

    Thank you for this wonderful post. It is very informative and useful. I would like to share something here too.Curso DP-420: Designing and Implementing Cloud Native Applications Using Microsoft Azure Cosmos DB. Durante este curso, aprenderá a diseñar e implementa


    Course DP-420: Designing and Implementing Cloud Native Applications Using Microsoft Azure Cosmos DB

    ReplyDelete
  7. Thank you for keeping me up to date on the situation; I'm looking forward to reading more. An article about the scroll test can be found here. The user's scrolling speed is tested in the Scroll test. For more information, go here.

    ReplyDelete