OOPS
November 12, 2023OOPS
November 12, 2023OOPS
|
Question 46
|
Which one of the following is correct for overloaded functions in C++ ?
|
Compiler sets up a separate function for every definition of function.
|
|
|
Compiler does not set up a separate function for every definition of function.
|
|
|
Overloaded functions cannot handle different types of objects.
|
|
|
Overloaded functions cannot have same number of arguments.
|
Question 46 Explanation:
→ Function overloading allows you to use the same name for different functions, to perform, either same or different functions in the same class.
→ Compiler sets up a separate function for every definition of function.
→ Two ways to use overloaded function is
1. By changing number of Arguments.
2. By having different types of argument.
→ Compiler sets up a separate function for every definition of function.
→ Two ways to use overloaded function is
1. By changing number of Arguments.
2. By having different types of argument.
Correct Answer: A
Question 46 Explanation:
→ Function overloading allows you to use the same name for different functions, to perform, either same or different functions in the same class.
→ Compiler sets up a separate function for every definition of function.
→ Two ways to use overloaded function is
1. By changing number of Arguments.
2. By having different types of argument.
→ Compiler sets up a separate function for every definition of function.
→ Two ways to use overloaded function is
1. By changing number of Arguments.
2. By having different types of argument.
