0

C language question

I still didn’t get what “return 0”, “return()” and “break;” do. How can I understand it properly?

18th Jan 2021, 5:36 PM
Jordana Barcelos Viana
Jordana Barcelos Viana - avatar
4 RĂ©ponses
+ 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.
18th Jan 2021, 6:03 PM
Mohammad Reza Sharifi Khorasani
Mohammad Reza Sharifi Khorasani - avatar
+ 1
Good advice, I’ll do that. Thanks, bro!
18th Jan 2021, 6:00 PM
Jordana Barcelos Viana
Jordana Barcelos Viana - avatar
18th Jan 2021, 6:01 PM
❀☆Nani☆❀
❀☆Nani☆❀ - avatar