Question

Consider the expression x + y/2 in the language C. How many different meanings dose this...

Consider the expression x + y/2 in the language C. How many different meanings dose this expression have, depending on the types of x and y? Explain each meaning.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

x + y / 2 can be evaluated as (x + y / 2) or (x + y) / 2.

  • If x and y are int, then the result is int
  • If x and y are float/double, then the result is float/double
  • If x and y are booleans, then the result is boolean
  • If x and y are char, then the result is char.
Add a comment
Know the answer?
Add Answer to:
Consider the expression x + y/2 in the language C. How many different meanings dose this...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT