+ 1
Difference between return 0 and return 1 ??
3 Answers
0
return is used when one function is called within another...
Return 0 return a value of Zero when it is called
Return 1 returns value of one.
Eg:-
int function(int x) {
if (x =1) return 0;
else return 1;
}
int main() {
int y;
function(5) // other than 1
y = x*2
cout << y ; // Prints 2 (1*2).
return 0;
function(1)
y = x*2
cout << y ; // Prints 0 (0*2)
return 0;
}
+ 1
thanks buddy
0
welcome âș