Can someone please explain the meaning of these return 1 vs return 0 vs break. I know 1 generally means true and 0 generally means false but how would they effect a return statement? Also when would you wanna use a return statement instead of a break statement and vice versa?
COKEDUDE 27 Junior Poster in Training
Recommended Answers
Jump to PostYou realy should google C functions and C control statements....You'll find the answers in these queries...
Jump to PostWhen I put "return 1" in a few of my programs it stopped execution of the rest of my program.
Returning from a generic function, or returning from main? Returning from main means your program is "done".
All 8 Replies
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
gerard4143 371 Nearly a Posting Maven
COKEDUDE 27 Junior Poster in Training
Dave Sinkula 2,398 long time no c Team Colleague
COKEDUDE 27 Junior Poster in Training
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
COKEDUDE 27 Junior Poster in Training
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
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.