+ 1

Why we use return0 why not return 1 in c++

Key difference between th2m

8th Sep 2020, 2:40 PM
khalid sheikh
khalid sheikh - avatar
7 Answers
+ 3
Because exit code 0 signifies success of the process as set by IEEE Computer Society
8th Sep 2020, 2:55 PM
Arsenic
Arsenic - avatar
+ 2
You can technically use any number you like but it's good practice to return 0 since that means success, as already answered.
8th Sep 2020, 7:44 PM
ReimarPB
ReimarPB - avatar
0
Yes we know the return 0 function. But why not return 1 insted return0
8th Sep 2020, 2:45 PM
khalid sheikh
khalid sheikh - avatar
0
Yes i know dear . We know that return 0 is an inteager value and return 1 is also an integer value so we use any one of them
8th Sep 2020, 2:49 PM
khalid sheikh
khalid sheikh - avatar
0
Good bro .
8th Sep 2020, 2:56 PM
khalid sheikh
khalid sheikh - avatar
0
Yes bro
9th Sep 2020, 2:21 AM
khalid sheikh
khalid sheikh - avatar