Conditional Expression
Learn about conditional expressions, and how to use them in C++.
We'll cover the following
Conditional expressions are of a special kind; these are not statements, but are a sort of contraction of the if-else
construct. This kind of expression can help to produce highly readable assignment statements fitting onto one line of the source code.
Syntax
This is the syntax:
Create a free account to access the full course.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy