asked 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)

asked
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>

answered
User Jkh
by
8.5k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.