English

If m, n, p are the three integers, then which of the following holds true, if (m == n) andand (n != p)? - Computer Applications

Advertisements
Advertisements

Question

If m, n, p are the three integers, then which of the following holds true, if (m == n) && (n != p)? 

Options

  • 'm' and 'n' are equal

  • 'n' and 'p' are equal

  • 'm' and 'p' are equal

  • None

MCQ

Solution

'm' and 'n' are equal

Explanation:

The condition (m == n) && (n != p) means:

  • m == n: m and n are equal.
  • n != p: n is not equal to p. 

So, m and n are equal, but n and p are unequal.

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.08: Conditional Statements in Java - EXERCISES [Page 98]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.08 Conditional Statements in Java
EXERCISES | Q I. 1. | Page 98
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×