Advertisements
Advertisements
प्रश्न
Given: String st = (a>= 90)? "Excellent": "Best";
Predict the output, when a = 90.
पर्याय
Best
Excellent: Best
Best: Excellent
Excellent
MCQ
उत्तर
Excellent
Explanation:
Since condition (a>= 90) of the ternary operator is true, st is assigned the value of expression 1, i.e., excellent.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?