data type for result of conditions in C

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashisharya786
    New Member
    • May 2010
    • 1

    data type for result of conditions in C

    hi,
    can any one tell me.when we evaluate a condition using if statement in C, result is either 0 or 1.what is the type of this result. that is 0/1 are of type int or boolean or any other type.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    In C89 there is not boolean type, the result is of type int.

    In C99 and C++ there is a bool type and I believe that is the type returned by conditional statements.

    Comment

    Working...