मराठी

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×