Hello im having trouble understanding between the difference 0 and 1 in C. the way i understood it is that 0 is true and 1 is false. Is this correct??? or is it 0 is false and 1 is true??
speedy94519
0
Light Poster
Recommended Answers
Jump to Post>there is nothing in C demands that TRUE = 1 and FALSE = 0.
Depends on the context. If you mean at the language level, then yes, relational comparisons are required to treat zero as false and non-zero as true.>for instance, i write device drivers following a popular
…
All 7 Replies
William Hemsworth
1,339
Posting Virtuoso
mrnutty
761
Senior Poster
kvprajapati
commented:
Yes.
+6
Dave Sinkula
2,398
long time no c
Team Colleague
jephthah
1,888
Posting Maven
William Hemsworth
1,339
Posting Virtuoso
mrnutty
761
Senior Poster
Narue
5,707
Bad Cop
Team Colleague
jephthah
commented:
i stand corrected
+5
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.