The statement return 2 3 1 1 5 returns the value 2 3 6 7

The statement: return 2 * 3 + 1, 1 + 5; returns the value _______. 2 3 6 7

Solution

6 will be return as with comma separated values when the expression containing commas is evaluated , the last value of the comma group is considered hence in the below statement

return 2*3+1,1+5

return 7,6

last value is 6 hence

6 will be returned

Correct answer is c.

 The statement: return 2 * 3 + 1, 1 + 5; returns the value _______. 2 3 6 7Solution6 will be return as with comma separated values when the expression containin

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site