由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - What does C++ program return to the operating system?
相关主题
Three C/C++ Programming Questions请大虾们推荐一本关于embedded real-time programming书
JAVA generic programming 是怎么实现的?推荐一个network programming的C++ library? (转载)
C++ Programming Zone zz[合集] Thinking in C++这本书怎么样啊?
哪儿有经典的C++ programing 习题集嘛?pthread and C++
提议:发起写书评活动good book on C/C++ programming under Linux/UNIX
Thinking in C++这本书怎么样啊?请推荐本php programming的书
C#有没有很经典类似c++ programming language那样的书?ZZ: 初学者学习C++的50条忠告
各位给推荐一个C++ programming performance profiler?C++证书
相关话题的讨论汇总
话题: what话题: return话题: c++话题: operating话题: system
进入Programming版参与讨论
1 (共1页)
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.
1 (共1页)
进入Programming版参与讨论
相关主题
C++证书提议:发起写书评活动
什么是win xp 上最好的C programming environment?Thinking in C++这本书怎么样啊?
申请programming版副C#有没有很经典类似c++ programming language那样的书?
求书memory as a Programming Concept in C and C++各位给推荐一个C++ programming performance profiler?
Three C/C++ Programming Questions请大虾们推荐一本关于embedded real-time programming书
JAVA generic programming 是怎么实现的?推荐一个network programming的C++ library? (转载)
C++ Programming Zone zz[合集] Thinking in C++这本书怎么样啊?
哪儿有经典的C++ programing 习题集嘛?pthread and C++
相关话题的讨论汇总
话题: what话题: return话题: c++话题: operating话题: system