0
C language question
I still didn’t get what “return 0”, “return()” and “break;” do. How can I understand it properly?
4 Respuestas
+ 1
1. "return" keyword ends the execution of a function.
2. "return something" or "return (something)" is the same. Both of them path the "something" variable to the function's output.
3. The use of "return 0" is for telling compiler that execution of the program ended successfully. If the returend number isn't zero, then it means something worngs.
4. "break" keyword ends the execution of a loop.
+ 1
Kindly use search bar 🔎🔍before posting a question. you may get no.of related questions that will help you .
https://www.sololearn.com/discuss/554024/?ref=app
https://www.sololearn.com/discuss/1096785/?ref=app
https://www.sololearn.com/discuss/1761564/?ref=app
https://www.sololearn.com/discuss/1472671/?ref=app
https://www.sololearn.com/discuss/885457/?ref=app
https://www.sololearn.com/discuss/1869024/?ref=app
+ 1
Good advice, I’ll do that. Thanks, bro!
+ 1
Jordana Barcelos Viana welcome