C Question Mark Character – What Does the ‘?’ Character Mean?

c++

What does a question mark (?) in C mean?

Best Answer

? is the first symbol of the ?: conditional operator.

a = (b==0) ? 1 : 0;

a will have the value 1 if b is equal to 0, and 0 otherwise.

Related Question