C++ 60 Questions
C++ 60 Questions
C++ 60 Questions
UNIT-1
Q.2 Distinguish between Procedure Oriented Programming and Object Oriented Programming.
Q.3 Define Object Oriented Programming (OOP) and List out the basic concepts of Object Oriented
Programming.
Q.6 Define the 2 memory management operators and List out the memory differencing operator.
Q.8 What are the Merits and Demerits of Object Oriented Methodology.
UNIT-2
Q.1 What are the difference between reference variables and normal variables?
Q.4 What is friend function? What is the use of using friend functions in c++? Explain
with a Program.
Q.5 What are the advantages of using default arguments? Explain with an example
program.
Q.6 Explain copy constructor and destructor with suitable C++ coding.
Q.8 Define an examiner class. Provide all necessary data and function members to
provide the following: The examiner must access answer sheets of at least one
represent local university; and have more than one constructor including one default
Q.9 Write a program to demonstrate how a static data is accessed by a static member
function.
Q.10 Write a program to get the student details and print the same using pointers to objects
and pointers to members of a class. Create a class student. And use appropriate
functions and
data members.
UNIT-3
Q.1 Explain about Unary Operator and Binary Operator Overloading with program.
Q.2 List out the rules for overloading operators with example.
Q.3 How will you overload Unary & Binary operator using member functions?
Q.4 How will you overload Unary and Binary operator using Friend functions?
Q.6 What is meant by casting operator and write the general form of overloaded
casting operator?
Q.8 For a supermarket, define a bill class. All the bill objects will contain bill number,
name of clerk preparing the bill, each item with quantity and price and total amount
to be paid. Total items in the bill are varying. Define dynamic memory allocation
constructor for bill class such that any number of items from 1 to 50 can be
accommodated in a single bill. There is an array describing each item with a price.
The price is to be picked up from that array. Now overload = operator and provide
UNIT-4
Q.1 What are the virtual functions? Explain their needs using a suitable example. What
Q.2 What are the different forms of inheritance supported in c++? Discuss on the
Q.7 Explain about File Pointers and their manipulations with example.
Q.9 Define a student class. Inherit that into MCA Student class and Non MCA Student.
MCA Students inherits into GLSSTudents and Non GLS Students. A function
Show Practical Hours can only be applied to MCA Students. We have a base class
Student pointer to a GLS Student object. Use dynamic_cast ti check that Non MCA
UNIT-5
Q.3 What is Exception? Explain the types of Exception handling technique in C++.
Q.4 What is the difference between Exception & Error? Describe it.
Q.5 What are the container classes? Explain the concept of STL in generic Programming.
Q.7 Write a C++ program to handle exception using try () catch () block.
Q.8 What is Namespace? Write a sample C++ program using namespaces.