Multiple choice

The function definition of the statement “A function called process accepts an integer and two floating point numbers and returns a double precision quantity”, is

  1. float process( int i, float a, float b)

  2. double process(int i, double a, double b);

  3. double process (int i, float a, float b);

  4. long process(int i, float a, float b);

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The function signature must match the specification: accepts an integer (int i), two floating point numbers (float a, float b), and returns a double precision quantity (double return type). Option C matches exactly: double process(int i, float a, float b). Note that option B is a declaration (semicolon) not a definition (no body).