Q:

Using Table 4.12 (p. 166), parenthesize the following expressions to indicate the order in which the operands are grouped

0

Using Table 4.12 (p. 166), parenthesize the following expressions to indicate the order in which the operands are grouped:

(a) * vec.begin()

(b) * vec.begin() + 1 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

(a) `* vec.begin()  ==>  * ((vec.begin)())`

 

The order is: member selector, function call, dereference.

 

(b) `* vec.begin() + 1  ==>  ( * ((vec.begin)())) + 1`

 

The order is: member selector, function call, dereference, add.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now