हिंदी

If (a < b) c = a; else c = b; It can be written as: - Computer Applications

Advertisements
Advertisements

प्रश्न

if (a < b) 
    c = a;
else
    c = b;

It can be written as:

विकल्प

  • c = (b < a) ? a : b;
  • c = (a != b) ? a : b; 
  • c = (a < b) ? b : a;
  • None

MCQ

उत्तर

None

Explanation:

Its correct representation using the ternary operator is: 

c = (a < b) ? a : b
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.08: Conditional Statements in Java - EXERCISES [पृष्ठ ९८]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 1.08 Conditional Statements in Java
EXERCISES | Q I. 4. | पृष्ठ ९८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×