हिंदी

Evaluate the following expression as per Java priority and associativity. 24 % (3*2)

Advertisements
Advertisements

प्रश्न

Evaluate the following expression as per Java priority & associativity.

24 % (3*2)

मूल्यांकन
Advertisements

उत्तर

Priority (Precedence): Parentheses () have the highest precedence, so the expression inside them is evaluated first.

  • (3 * 2): Evaluates first, giving 6. The expression simplifies to 24 % 6.
  • 24 % 6: Performs the modulo operation. Since 24 is exactly divisible by 6 (6 × 4 = 24), the remainder is 0.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1: Revision of Class 9 Syllabus - Exercises [पृष्ठ ४५]

APPEARS IN

रुपा पंडित Computer Applications [English] Class 10 ICSE
अध्याय 1 Revision of Class 9 Syllabus
Exercises | Q 4. (viii) | पृष्ठ ४५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×