a. run-time
b. never expanded
c. compile-time
d. end of the program
The correct option is (c)
Explanation:
An inline function is expanded during the compile-time of a program.
a. When a function is declared.
b. When the scope of the function is over.
c. When a function is defined.
d. When a function is called.
The correct option is (a)
Explanation:
Default values for a function is defined when the function is declared inside a program.
a. start() function
b. new() function
c. main() function
d. end() function
The correct option is (c)
Explanation:
execution of a C++ program starts with the main() function.
a. Void virtual foo()= { 0 }
b. Virtual void foo() =0
c. Virtual void foo() {} = 0;
d. None of the above
The correct option is (b)
Explanation:
b is the correct declaration of pure virtual function in a class in C++.NOTE: Pure virtual function is used in an Interface or an abstract class
a. Only inside the {} block.
b. Whole program.
c. The main function.
d. None of the above.
The correct option is (a)
Explanation:
The variable is valid only in the function block as in other.
a. 0
b. 1
c. 2
d. 3
The correct option is (b)
Explanation:
The main function is the mandatory part, it is needed for the execution of the program to start.
a. %.
b. &
c. :
d. ::
The correct option is (d)
Explanation:
1 is the minimum numbers of functions need to be presented in c++.
a. call by reference
b. call by pointer
c. call by object
d. call by value
The correct option is (a)
Explanation:
In the call by reference, it will just passes the reference of the memory addresses of passed values rather than copying the value to new memories which reduces the overall time and memory use.