Alex Rivera | Logout

ternary operator without else in C

Asked 2012-09-04T09:43:24.700
53

I want to use ternary operator without else in C. How do I do it.

(a)? b: nothing;

something like this. What do I use in nothing part?

Edit
Report

1 Answer

-11

Try this

BOOL bIsOK = (a == 5)?TRUE:FALSE;
answered 2012-09-04T11:12:05.137

Your Answer