hi guys
can i know way do we use return 0
in the main function.
what it's function ?
thanx for all.
hi guys
can i know way do we use return 0
in the main function.
what it's function ?
thanx for all.
Why we return 1 in the main function?
Cuz if we declared the main function like this: int main() so this says, we need to return an integer an the end of the function, and this is what return 0 do.
What is a function? search on the forum, or google, sure you'll find an answer.
A return code is used by functions to signal either success or failure. Functions declared with void don't return anything, and this is fine inside your program if you don't want to know if that function succeeded. The operating system however is always expecting a return code, which is why main should return an integer. Returning 0 is standard for success.
Demonographic rhinology is not the only possible outcome, but why take the chance