222k views
5 votes
Assume the function double returns its argument multiplied by 2. What value will the variable x hold after the following line is executed?

x = double(4) + double(2)

User Melitza
by
7.5k points

1 Answer

7 votes

Answer:

12

Explanation:

You want to know the value of the expression x = double(4) +double(2) where double(p) = 2×p.

Evaluate

The expression resolves to ...

x = 2×4 +2×2

x = 8 + 4

x = 12

The value x will hold is 12.

<95141404393>

User Jkh
by
8.5k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories