首页 > 其他 > 详细

NULL 和 0

时间:2017-05-03 12:32:41      阅读:161      评论:0      收藏:0      [点我收藏+]

Question:

What is the difference from NULL and "0"?

Example:

return NULL;
return 0;
Answer:

Conceptually, zero (0) is a number, and NULL is a value that represents "no value". As such, 0 can be added, subtracted, etc., but NULL cannot. The NULL value for a variable can indicate, for example, that a variable has not yet been assigned a value.

The semantics of NULL may vary by language or application.

NULL 和 0

原文:http://www.cnblogs.com/slgkaifa/p/6801092.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!