July 9, 2021 in C and CPP
What is an exception?
c) What is an exception? How do you handle exceptions in C++? Can you have multiple catch
blocks with a single try block? Explain with example.
July 9, 2021 in C and CPP
c) What is an exception? How do you handle exceptions in C++? Can you have multiple catch
blocks with a single try block? Explain with example.
July 9, 2021 in C and CPP
b) What is the difference between a reference and a pointer? What is the difference between
the address stored in a pointer and the value at that address?
July 9, 2021 in C and CPP
a) Describe the basic concepts of Object Oriented Programming and bring out the advantages
of OOP.
July 9, 2021 in C and CPP
c) How do you differentiate between overloading the prefix and postfix increments? Can you
overload the operator+ for short integers? Is it legal in C++ to overload operator++ so
that it decrements a value in your class?
July 9, 2021 in C and CPP
b) How to initialize more than one variable in a for loop? Is it possible to write a for loop with a body that is never executed? Is it possible to create a loop that never ends? Give an example. What happens if you create a loop that never ends?
July 9, 2021 in C and CPP
a) When is the copy constructor called? When is the destructor called? How does the copy
constructor differ from the assignment operator (=)?
July 9, 2021 in C and CPP
b) What are containers? Explain with the help of suitable example.
July 9, 2021 in C and CPP
b) What are containers? Explain with the help of suitable example.
July 9, 2021 in C and CPP
a) Write a program that creates two SimpleCircle objects. Use the default constructor on
one and instantiate the other with the value 9. Call increment operator ++ on each
object and then print their values. Finally, assign the second to the first and print its values.
July 9, 2021 in C and CPP
A. Inheritance B. Private C. After
D. Ostream E. Contents F. Derived Class
G. Base Class H. Before I. istream
J. While K. Process.h L. Math.h
M. Public N. Constructor O. Class
4.1 ________ allows to derive new classes from already existing classes.
4.2 ________ is a control statement that can be used when uncertain numbers of loopings are
there.
4.3 ________ header file should be included to use the function exit ( ).
4.4 Inline function should be defined ________ the main ( ) program.
4.5 An object can be initialized on creation using ________.
4.6 A constructor’s name is same as _________ name.
4.7 ________ type of declaration of a base class enables an object of a derived class to access member functions.
4.8 A variable returns ________, if it is simply referenced by its name.
4.9 put ( ) and write ( ) are member functions of ________.
4.10 A virtual function should be defined and declared in ________.