Here is a function declaration float ratiofloat x float y An
Solution
(11)
Given function declaration:
float ratio(float x, float y);
Input parameters: Two separate float type values
Return Value: float type value
Given Options:
(a) r = ratio(a,b);
a, b are declared as float type values and variable r is also declared as float type variable.
This function call satisfies the signature of method ratio.
Hence this is VALID.
(b) r = ratio(d[0], d[1]);
d is an array of float type type with 2 elements at indices 0, 1.
d[0], d[1] are two float type values of array d and variable r is also declared as float type variable.
This function call satisfies the signature of method ratio.
Hence this is VALID.
(c) r = ratio(a, d);
d is an array of float type with 2 elements at indices 0, 1.
a is a float variable but Variable d is holding an array of elements rather than single value
Function ratio accepts two single float type variables but not array.
This function call doesn\'t satisfies the signature of method ratio.
Hence this is INVALID.
(d) r = ratio(a, d[1]);
d is an array of float type with 2 elements at indices 0, 1.
a is a float variable and d[1] is a single float type value of array d at index 1.
Function ratio accepts two single float type variables and returns a single float type variable.
This function call satisfies the signature of method ratio.
Hence this is VALID.
_________________________________________________________________________________________________________________________________________
(12)
Given function call:
d[0] = fraction(a, b);
Variable d is an array of float type.
Variables a, b are of two int types.
The function call that satisfies the given call should be able to:
(i) Two Input parameters of type int.
(ii) Return value of type float.
float fraction(float, float);
Given options:
(a) float fraction(int parts[2]);
This function signature accepts a single int type value and returns a float type value.
Hence this function signature is Not Correct.
(b) float fraction(numerator, denominator);
Data types are missing in the function signature.
Hence this function signature is Not Correct.
(c) float fraction(int numerator, int denominator);
This function signature accepts a two int type values and returns a single float type value.
Function signature matches with function call.
Hence this function signature is Correct.

