0% found this document useful (0 votes)
34 views6 pages

CPP Topicwise Interview Qns

The document covers various fundamental concepts of Object-Oriented Programming (OOP) in C++, including classes, objects, constructors, destructors, operator overloading, inheritance, templates, exception handling, file operations, and the Standard Template Library (STL). It discusses the significance of these concepts, their differences, and practical applications with examples. Additionally, it addresses specific questions related to memory allocation, access specifiers, and error handling in C++.

Uploaded by

teju96bha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views6 pages

CPP Topicwise Interview Qns

The document covers various fundamental concepts of Object-Oriented Programming (OOP) in C++, including classes, objects, constructors, destructors, operator overloading, inheritance, templates, exception handling, file operations, and the Standard Template Library (STL). It discusses the significance of these concepts, their differences, and practical applications with examples. Additionally, it addresses specific questions related to memory allocation, access specifiers, and error handling in C++.

Uploaded by

teju96bha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

class and Objects:-

-------------------

[Link] is class? Explain the significance in OOP.

[Link] is difference between structure and class in C++?

[Link] memory will allocated for class data members and memmber functions?

[Link] are static data members? why they are nedded?

[Link] are static objects?write short code to explain their concept?

[Link] the concept of dynamic memory allocation for array of objects with an example?

[Link] can we return an object from a function?

[Link] short note on this pointr?

[Link] function should be declared as constant member function?

[Link] do we pass constant objects as parameters?

[Link] Empty class?

[Link] are friend function? are they a threat to data hiding?


How they help in data encapsulation?

[Link] there any way to access class private members without its object? justify your answer?

Constructor and Destructor:-


----------------------------
[Link] is the significance of Constructor?

[Link] it Manditory to Define a Constructor for Every class?

[Link] a C++ program that has a class Execute without a constructor?

[Link] a Constructor is called a Special Memebr function?

[Link] the similarities and desimilarities between a constructor and Destructor?

[Link] some Key features of Constructor?

[Link] the different types of Constructors?

[Link] are the techniques of invoking a copy constructor?

[Link] does copy constructor accep the objects the objects by Reference and not by value?
[Link] you have constructor with all the default arhguments? justify your answer?

[Link] between constructor and Detructor?

[Link] the significance of Destructor function?

[Link] you call Explicitly call a constructor and Destructor from the main()? if yes , How?

[Link] can a Destructor be called from a constructor?

[Link] will you invoke a private constructor

[Link] short note on anonymous class

[Link] the significance of nameless objects?

[Link] between a local and a global objects?

Operator Overloading:-
----------------------
[Link] the term Operator Overloading and explain its significance?

[Link] does operator overloading support the concept of polymorphism?

[Link] we perform function overloading on operator overloaded operators? if Yes? How?

[Link] are the advantages of overloading the operator?

[Link] the operator that cannot be overloaded?what advantages do we get when operator overloaded
function return an object?

[Link] a few reasons to overload the new and delete operators?

Inheritance:-
-------------
[Link] the need of Inheritance?

[Link] between a base class and derived class?

[Link] the significance of Different access specifiers used in inheritance?

[Link] there any way by which a derived class can access private members of the base class? if yes?
How?

[Link] happens when a protected member is inherited in private mode and public mode?
[Link] the different type of inheritance?

[Link] it mandatory for derived class to have a constructor?

[Link] multiple inheritance, what is the order of calling the constructor? explain with example
program?

[Link] between compile time binding and run time binding?

[Link] is run time polymorphism achived in C++?

[Link] do you mean by the term function overriding?

[Link] should we not use virtual functions within a constructor and destructor?

[Link] between virtual functions and pure virtual functions?

[Link] cannot we have virtual constructors?

TEMPLATES:-
-----------
[Link] do you understand by the term "template"?

[Link] do we need template? How does it benefit programmers?

[Link] some use of templates?

[Link] are function templates? explain with example program?

[Link] a generic function be overloaded? justify your answer with example program?

[Link] C++ allow recursive template functions? if yes? write one program?

[Link] we use user defined types of template types? if yes How?

[Link] C++ allow programmer to use more than one generic data type in a class template? if no
why? if yes? How?

[Link] we use static member with a template class? if yes write a program?

[Link] what ways can we combine the concept of class template and inheritance?

Exception Handling:-
--------------------
[Link] between logical and syntactical errors?

[Link] do you understand by synchronous and asynchronous exceptions?


[Link] is Exception? Give some common examples of exception that often occur in your program

[Link] the type of Exceptions?

[Link] the significance of try and catch block and give their syntax?

[Link] try block be nested inside another try block for a single try block?

[Link] between throw and throw exception?

8. why it is mandatory to handle Exceptions in class's constructor and destructor?

[Link] the utility of set_terminate() with the help of an example?

[Link] the utility of set_unexpected() with the help of an example?

Files:-
-------
[Link] do need files?

[Link] are streams?

[Link] the standard streams in C++?

[Link] is stream linked to a file?

[Link] the process of opening a file?

[Link] will you prefer to open a file using a constructor?

[Link] happens when a file opened for writing does not exists?

[Link] kind of errors can occur during file operation?

[Link] are the 2 ways of detecting the end of file?

[Link] can an opened file be closed?

STL(Sandard template Library):-


------------------------------
[Link] does the STL support reusability of code?

[Link] are containers? give examples?

[Link] are the different categories of algorithms?

[Link] are the different type of containers?

[Link] operators can be applied on iterators?


[Link] the significance of Boolean variables?

[Link] will be the result of applying the different operators on boolen variable?

[Link] the significance of mutable keyword

You might also like