What will be the output of the following C++ code? #include <iostream> using namespace std; int fun(int ...
View QuestionWhich of the following feature is used in function overloading and function with default argument?
a) Encapsulation b) Polymorphism c) Abstraction d) Modularity Answer: b Explanation: Both of the above types allows ...
View QuestionIf an argument from the parameter list of a function is defined constant then _______________
a) It can be modified inside the function b) It cannot be modified inside the function c) ...
View QuestionWhere should default parameters appear in a function prototype?
a) To the rightmost side of the parameter list b) To the leftmost side of the parameter list
View QuestionWhen we define the default values for a function?
a) When a function is defined b) When a function is declared c) When the scope of the function ...
View Question
In which of the following cases inline functions may not word?
i) If the function has static variables.
ii) If the function has global and register variables.
iii) If the function contains loops
iv) If the function is recursive
In which of the following cases inline functions may not word? i) If the function has static variables.
View QuestionAn inline function is expanded during ______________
a) compile-time b) run-time c) never expanded d) end of the program Answer: a Explanation: An ...
View QuestionWhat is an inline function?
a) A function that is expanded at each call during execution b) A function that ...
View QuestionWhat happens to a function defined inside a class without any complex operations (like looping, a large number of lines, etc)?
a) It becomes a virtual function of the class b) It becomes a default calling function ...
View QuestionWhich of the following is the default return value of functions in C++?
a) int b) char c) float d) void Answer: a ...
View Question