asked 137k views
3 votes
What is value returned by the following function?

int function()
{
int value = 35;
return value + 5;
value += 10;
}
a. 35
b. 40
c. 50
d. 10

asked
User FloSchmo
by
8.1k points

1 Answer

5 votes

Answer:

b. 40

Step-by-step explanation:

The return statement terminates the function and value += 10 is after the return statement, so it's only 35 + 5.

answered
User Fathima Km
by
7.9k points

No related questions found