Posts

Showing posts with the label ternary operator

C program Biggest of 3 number

The following two C program finds biggest of given 3 numbers read from the user using if conditional statement and ternary operator. The input 3 numbers read from user as inputs and finds biggest number from the inputs. IF condition and ternary operator if-else ladder if ( <condition-1> ) { <statements 1 > } else if ( <condtion-2>) { <statements 2 > } else { <statements 3 > } if-else ladder has successive one or more if and if-else conditional statements, if any one of condition satisfied in if-else ladder, control executes following statements enclosed by curly brace { <statement>} and then control come out of if-else ladder. if a condition is not satisfied in if-else ladder, control goes to next condition else-if (<statement>). if none of condition satisfied in if-else ladder, the control executes else part...