⟩ List the advantages of inheritance?
Allows the code to be reused as many times as needed. The base class once defined and once it is compiled, it need not be reworked.
Saves time and effort as the main code need not be written again.
Allows the code to be reused as many times as needed. The base class once defined and once it is compiled, it need not be reworked.
Saves time and effort as the main code need not be written again.
Which of followings is/are not false about friend function? 1. It can be called / invoked with class object 2. It has objects as arguments 3. It can have built-in types as arguments 4. It must declared only in public part of a class 5. It does not have this pointer as an argument a. Only 2,4 b. Only 1,2,5 c. Only 2,3,5 d. All of these
Default return the type of functions in CPP is a. void b. long c. char d. int
The Inline functions may not work ______. 1. If function contain static variables 2. If function contain global and register variables 3. If function returning value consists looping construct(i.e. for, while) 4. If inline functions are recursive 5. If function contains const value a. Only 1,4,5 b. Only 2,3,5 c. Only 1,3,4 d. All of these
Assigning one or more function body to same name is called_______________. a. Function Overriding b. Function Overloading c. Both a and b d. None
Default values for function are specified when____. a. function is defined b. function is declared c. Both a and b d. None of these
Explain the difference between realloc() and free()?
Can you please explain the difference between new and malloc and delete and free()
Explain realloc()?
Which of the following is invalid header file name? a) <iostring> b) <string> c) <iostream > d) <sstream>
The pow functions returns _____ a) int b) double c) string d) float