answersLogoWhite

0


Best Answer

If we consider any function that is not the main function that is declared as "bool" i.e it will return boolean values to the main function-0 & 1, meaning 'false' and 'true' respectively.

If we have to tell the main function that the condition checked in the function is false or disagreed, then we return 0 to the main function and when we have to tell that the condition checked in the main function is true or agreed, then we return 1 to the main function.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between return 0 and return -1 in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between 1 and 0?

The difference is 1 .


Is there a difference between you plus plus and plus plus you?

you++ will return the current value of you and increment it. ++you will increment it and then return the new value of you. So, for example: int you = 0; cout << you++; // this will print 0 cout << you; // this will print 1 int you = 0; cout << ++you; // this will print 1 cout << you; // this will also print 1


What is the difference between direct and indirect recursion?

I hope these example will help you: static int Direct (int n) { if (n<=0) return 0; else return n + Direct (n-1); } static int InDirect (int n) { if (n<=0) return 0; else return n + Buddy (n-1); } int Buddy (int n) { return InDirect (n); }


What is the difference between ratinal and irrational?

-1 between 0


What is the difference between -1 and 5?

Six. From -5 to 0 is five, and from 0 to 1 is one.


Does 1 represent the difference between two equal fractions?

No, the relevant difference is 0.


What is the diff between return 0 and return 1 in c?

The value. In some context 1 means 'yes', 0 means 'no'. In other contexts 0 means ok, other values are error codes.


How to round 0.06 to a whole number?

0.06 lies between the whole numbers 0 and 1. Difference between 0 and 0.06 is 0.06. Difference between 1 and 0.06 is 0.94 So, 0 is much closer to 0.06 and therefore 0.06 rounded to the nearest whole number is 0.


The difference between 0 spot and 1 spot?

Orientation. ~Dodge


What is difference between the smallest digit and the largest digit .Not including 0?

The smallest digit (not including 0) is 1, the largest is 9 ((in the decimal system). The difference is 9 - 1 = 8


What is the difference between -5 -1 2 5 1 -2 - 4 -4 -5 -2 -1 0 0 1?

+4 +3 +3 -4 -3 -2 0 -1 +3 +1+1 0 +1


does 0 and 1 have a difference of 2?

No, they have a difference of 1.