English

What is the result of evaluating the following expression? –32/6

Advertisements

Question

What is the result of evaluating the following expression?

–32/6

Numerical
Advertisements

Solution

Given expression:

–32/6

\[ =-\frac{32}{6} \]

= –5.3333

Since both operands are integers, Java performs integer division and discards the fractional part.

–5

shaalaa.com
  Is there an error in this question or solution?
Chapter 6: Variables and Expressions - EXERCISE [Page 132]

APPEARS IN

Dheeraj Mehrotra Computer Science [English] Class 12
Chapter 6 Variables and Expressions
EXERCISE | Q 52. | Page 132
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×