aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Computer Science and Information Technology Fundamentals
  • If y is of integer type, then the expression 3 x (y-8)/9 ...
Multiple choice

If y is of integer type, then the expression 3 x (y-8)/9 and (y-8)/9 x 3

  1. may or may not yield the same value

  2. must yield the same value

  3. must yield different values

  4. Cannot be said

  5. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Since / and * operators have the same hierarchy and one can do / and * operations alternately,  it may or may not yield the same value.

Keep practicing — related questions

  • If y is of integer type, the expressions 3*(y-8)/9 and (y-8)/9*3 yield the same result if
  • Suppose a, b and c are integer variables assigned values 8, 3 and -5 respectively. In this case, the respec...
  • The operations y >> 3 and y >>> 3 produce the same result when y > 0.
  • Suppose i, j and k are integer variables with values 1, 2, 3 respectively, what is the value of the followi...
  • If i, j and k are integer variables with values 8, 15 and 4 respectively, the arithmetic expression 2 * ((i...
  • What will be the output of the program? class Bitwise { public static void main(String [] args) { int x = 1...
  • switch(x) { default: System.out.println(Hello); } Which two are acceptable types for x? 1. byte 2. long 3. ...
  • Which of the following are legal lines of code? 1. int w = (int)888.8; 2. byte x = (byte)1000L; 3. long y =...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy