English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Compare an if and a ? : operator. - Computer Science

Advertisements
Advertisements

Question

Compare an if and a ? : operator.

Distinguish Between

Solution

The if statement evaluates a condition, if the condition is true then a true-block is executed, otherwise false-block will be executed! Block may consist of one or more statements. The conditional operator (or Ternary operator). is an alternative for the ‘if-else statement’. Here if the condition is true one statement otherwise another statement will be executed.

shaalaa.com
Statements
  Is there an error in this question or solution?
Chapter 10: Flow of Control - Evaluation - Section - B [Page 178]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 10 Flow of Control
Evaluation - Section - B | Q 8. | Page 178
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×