Harry2o
Harry2o

Reputation: 43

what is the type of the return value of binary operators in C

can anyone tell me the type of value to which e.g. a==b (or in general any if-statement) evaluates in C? Probably char or int?

Upvotes: 0

Views: 268

Answers (1)

KV Prajapati
KV Prajapati

Reputation: 94645

In C language, result of Boolean/relational expression is non-zero (true) or zero (false), which is a signed int type.

Upvotes: 2

Related Questions