Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

double score (double n_points, double time) { double player_score(0.0); if (time

ID: 3677698 • Letter: D

Question

double score (double n_points, double time)

{

double player_score(0.0);

if (time != 0.0)

{

player_score = 1000.0*n_points / time;

}

}

Select the correct statements about the code above.

player_score is a function name

score is a function name

double score (double n_points, double time) in the code is a prototype.

n_points and time are called parameters

request_int(); is

neither of the other three suggestions

function definition

function call

prototype

void func(int x)

{ x = x + 1;

cout << "x = " << x;}

int main ()

{ int val(1);

func(val);

cout << " val = " << val << endl;

return 0;}

What will be displayed?

val = 3 x = 2

val = 2 X = 1

x = 2 val = 1

x = 1 val = 2

A.

player_score is a function name

B.

score is a function name

C.

double score (double n_points, double time) in the code is a prototype.

D.

n_points and time are called parameters

Explanation / Answer

B.    score is a function name
D.    n_points and time are called parameters

2. request_int(); is option C

C.   function call

3. What will be displayed? answer is option C

C.     x = 2, val = 1