What will be the outcome of the following conditional statement if the value of variable s is 10?

4 years ago
C Programming

s >=10 && s < 25 && s!=12

The outcome will be TRUE. Since the value of s is 10, s >= 10 evaluates to TRUE because s is not greater than 10 but is still equal to 10. s< 25 is also TRUE since 10 is less then 25. Just the same, s!=12, which means s is not equal to 12, evaluates to TRUE. The && is the AND operator, and follows the rule that if all individual conditions are TRUE, the entire statement is TRUE.

0
Sanisha Maharjan
Jan 20, 2022
More related questions

Questions Bank

View all Questions