Final answer:
The overloading invoked by the call g(1,2) is 'void g(int value, int count)' as the arguments directly match the parameter types without needing type conversion.
Step-by-step explanation:
The question is about overloadings and which one will be invoked by a specific function call in a programming context. When the call g(1,2) is made, the compiler looks for the best match where the arguments can be matched to the parameters of the function without needing any type conversion or with the least amount of type conversion.
Given the options:
- int g(int count, double value);
- void g(double value, int count);
- void g(int value, int count);
- Neither, the compiler cannot decide which of these to use.
The correct overloading function that would be invoked here is void g(int value, int count), because both arguments 1 and 2 are integers and match directly with the parameter types of this function without any need for type conversion, making it the best match.