filmov
tv
Ternary operator in C | Conditional operator in C programming

Показать описание
In this video, I will teach you Conditional operator in C programming. The Conditional operator is also known as a Ternary operator in C.
Here is the syntax of the conditional operator:
Operand1 ? Operand2 : Operand3
Since this operator needs three operands, it is also called a Ternary operator.
Operand1 can be any expression that evaluates to TRUE or FALSE. Operand2 and Operand2 can be an expression or a value.
If Operand1 evaluates to TRUE, Operand2 is evaluated and the result is retuned. If Operand1 evaluates to FALSE, Operand3 is evaluated and the result is returned.
Useful links:
#ternaryoperator #conditionaloperator #cprogramming #c #programmingtutorial #aptuts
Here is the syntax of the conditional operator:
Operand1 ? Operand2 : Operand3
Since this operator needs three operands, it is also called a Ternary operator.
Operand1 can be any expression that evaluates to TRUE or FALSE. Operand2 and Operand2 can be an expression or a value.
If Operand1 evaluates to TRUE, Operand2 is evaluated and the result is retuned. If Operand1 evaluates to FALSE, Operand3 is evaluated and the result is returned.
Useful links:
#ternaryoperator #conditionaloperator #cprogramming #c #programmingtutorial #aptuts