-
Operators
In the following code fragment, which is the calling object for the less-than operator?string s1, s2;if( s1 < s2 )Choose one answer. a. s1 b. < c. s2 d. none
-
Classes
What error is caused by the following code ?class TemperatureList { public: TemperatureList( ); private: double * list; int size;};void func(Money amount);[...]int main{ TemperatureList list1; func(list1); return 0;}Choose one answer. a. double free b. divide by zero c. illegal argument d. no error
-
Copy Constructor
Explain what is copy constructor and what is the difference between copy constructor and overloaded assignment operator
-
-
Which of the following operators can not be overloaded
A) == b)++ c)?! d)
-
Inline functions advantages
What is the inline function and what is the use of inline function?
-
-
C++ conversion program
How can I write a program that convert a given number of millimeters into the equivalent length in meters and meters into the equivalent length in millimeters?Also draw flowchart,algorithm,output.
Binary
Write a program that continues to ask the user to enter any decimal number and calculate it’s binary,octal and hexadecimal equivalent.
C++ Macros Functionality
What is the main thing that C++ macros can do that cannot be done with functions? Give a realistically useful example of something of this kind.
Macros have the distinct advantage of being more efficient than functions, because their corresponding code is inserted directly into your source code at the point where the macro is called. There is no overhead involved in using a macro like...Constructor Use
Why the constructor is used?
What is RTTI?
Runtime type identification (RTTI) lets you find the dynamic type of an object when you have only a pointer or a reference to the base type. RTTI is the official way in standard C++ to discover the type of an object and to convert the type of a pointer or reference (that is, dynamic typing). The need came from practical experience with C++. RTTI replaces many homegrown versions with a solid, consistent...
Ans