S*****H 发帖数: 90 | 1 What is the correct value to return to the operating system upon the
successful completion of a program?
A. -1
B. 1
C. 0
D. Programs do not return a value. |
t****t 发帖数: 6806 | 2 没听说过有硬性规定,只有常用的约定,而且跟C++也毫无关系
【在 S*****H 的大作中提到】 : What is the correct value to return to the operating system upon the : successful completion of a program? : A. -1 : B. 1 : C. 0 : D. Programs do not return a value.
|
S*****H 发帖数: 90 | 3 The given answer is 0. No explanation is given.
I do not undertand why. |
t****t 发帖数: 6806 | 4 常用的约定的确就是0.但是也并不规定一定要这样做.
【在 S*****H 的大作中提到】 : The given answer is 0. No explanation is given. : I do not undertand why.
|
u****u 发帖数: 229 | 5 you can return anything, nothing in the system cares about this value.
【在 S*****H 的大作中提到】 : What is the correct value to return to the operating system upon the : successful completion of a program? : A. -1 : B. 1 : C. 0 : D. Programs do not return a value.
|
O*******d 发帖数: 20343 | 6 Usually you return 0 for success, non-zero for errors. An invoking program,
say a perl script, may check the returned value. |