CP I/O Q2

0. If y is of integer type then the expression
3 * ( y - 8 ) / 9 and ( y - 8 )/ 9 * 3

  • Option : C
  • Explanation :
    If y = 11, the expression 3 * (y - 8) / 9 becomes 3 * 3 / 9. Which evaluates to 1.
    But the expression ( y - 8 )/ 9 * 3 becomes 3 / 9 * 3. Which evaluates to 0 (since 3 / 9 is 0)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *