C Program

Write a program to determine the value of b depending on the inputted value of a. The variable a is used with conditional operator.

The above program uses conditional operator to determine the value of ‘b’ based on the inputted value of ‘a’. The conditional operator ‘?’ is used in this program to assign a value to the variable ‘b’. The syntax for the conditional operator is: condition ? expression1 : expression2 If the condition is true, expression1 is […]

Scroll to top