INTRODUCTION TO NET
BASICS OF NET FRAMEWORK
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Different parameter data types.
|
|
Different order of parameters
|
|
Different number of parameters
|
|
All of above
|
Detailed explanation-1: -By changing the number of parameters in a method. By changing the order of parameters in a method. By using different data types for parameters. 26-Jul-2019
Detailed explanation-2: -There are mainly two types of overloading, i.e. function overloading and operator overloading. Function overloading improves the code readability, thus keeping the same name for the same action.
Detailed explanation-3: -Function overloading is a feature of Object Oriented programming languages like Java and C++. As we know, C is not an Object Oriented programming language. Therefore, C does not support function overloading.
Detailed explanation-4: -Usually, method overloading happens inside a single class, but a method can also be treated as overloaded in the subclass of that class-because the subclass inherits one version of the method from the parent class and then can have another overloaded version in its class definition.
Detailed explanation-5: -Different Number of Parameters. The first and the simplest category of method overloading is when the methods have a different number of parameters in their signatures. Different Type of Parameters. Different Order of Parameters. Optional Parameters. Named Arguments.