Possible Duplicate:
default value of BOOL in Objective-C?
If I declare a BOOL
property in a class, what will be its default value? If I don't set a value for the variable when creating an object of the class, is it always NO
or will it return YES
in any case?
It'll be NO.
It'll be initialized to FALSE/NO,
Because when you declare it without any value, it'll be initialized to zero
, zero means FALSE
or NO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With