0

What happens if we return 1 at the end of program

return1

7th Jul 2018, 1:10 PM
saran
4 odpowiedzi
0
It signals that the program produced an error with the error code 1.
7th Jul 2018, 1:12 PM
Kevin Eldurson
Kevin Eldurson - avatar
0
Whr do we usually use it...
7th Jul 2018, 1:13 PM
saran
0
It's useful to tell what went wrong. For example you could return 1 if someone divided by zero in a program, this way you know why the error occured.
7th Jul 2018, 1:21 PM
Kevin Eldurson
Kevin Eldurson - avatar
0
Gr8.. Tnx..
7th Jul 2018, 1:52 PM
saran