0
Functions-return statement in C
Hello! I am quite aware of what the return statement is in C either that's in int main or in another function but I'm not quite sure of what does "return -1" mean. Thank you.
1 Answer
+ 4
Hey Margarita,
without any more insight into code of yours, " return -1" ( or any value other than 0, really) indicates an error code, i.e. something weng wrong inside the function.
Hence, 0 is returned if everything went OK.
Looking forward to answers from other peers :-).