125k views
3 votes
When you pass a double variable to a method, the method receives ______.a) a copy of the memory addressb) the reference of the variablec) the length of the variabled) a copy of the variablee) the binary memory address

1 Answer

6 votes

Answer:

The answer is "Option d".

Step-by-step explanation:

In this question the choice d, that is "a copy of the variable" is correct because the method takes a reference value or a copy of the variable in its parameter, the example of this question can be defined as follows:

void me2(double x)//defining a method me2 with a double parameter

{

//method body

}

double x = 35.655;//defining a double variable x

me2(x);//calling a method with passing the copy of th e variable

User Joy Wang
by
4.7k points