Answer:
The answer to this question can be given as:
Statement:
isQuadrilateral = (numberOfSides == 4) ? 1 : 0;
//check condition using ternary operator.
Explanation:
we know that both(Quadrilateral, numberOfSides) is already declared in the program. So the statement for check condition is (isQuadrilateral = (numberOfSides == 4) ? 1 : 0;). To check this condition we use the ternary operator. In this operator, we also check another condition. The syntax of ternary operator (condition ? value_if_true : value_if_false).In this statement on the lift side we use the variable for check condition and right side we check condition if the value is true it prints 1 else it will print 0.