NULL NUL \0 EOF
来源:互联网 发布:淘宝客怎样设置佣金 编辑:程序博客网 时间:2024/04/28 19:33
NULL: 定义为0或0L或(void *)0,用于指示一个指针值是空,即什么都不指;
'/0': 用且只用字符串结束符;
NUL : 0x00,0值字符,可以用于结束ASCII字符串,和'/0'类似,但是在c/c++中没有定义,如果要使用的话,需要自定义为 #define NUL '/0';
EOF : 通常定义为-1, 文件结束符标志,一般是ctrl+z.
NULL is a macro defined in several standard headers, 0 is an integer constant, '/0' is a character constant, and nul is the name of the character constant. All of these are *not* interchangeable.
NULL is to be used for pointers only since it may be defined as ((void *)0), this would cause problems with anything but pointers.
0 can be used anywhere, it is the generic symbol for each type's zero value and the compiler will sort things out.
'/0' should be used only in a character context.
nul is not defined in C or C++, it shouldn't be used unless you define it yourself in a suitable manner, like:
#define nul '/0'
- NULL NUL \0 EOF
- NULL, NUL, EOF, '/0'区别
- NULL, NUL, EOF, '/0'区别
- NULL, NUL, EOF, '/0'区别
- NULL, NUL, EOF, '\0'区别
- NULL,NUL,'\0','0'
- C语言中EOF NULL NUL和'\0'的区别和使用
- NULL,NUL,'\0'和0
- NULL、0、'\0'、NUL的区别
- NULL ,NUL,\0 ,0的区别
- (编程基础)NULL,NUL,\0,0
- NULL与NUL区别
- NULL和NUL区别
- NULL和NUL
- NULL和NUL
- NULL和NUL
- NULL & NUL in C
- NUL和NULL
- Android SQLiteOpenHelper 的作用及使用
- 在C语言中,double、long、unsigned、int、char类型数据所占字节数
- PHP中函数的声明定义及应用举例详细分析
- 重要!!!!!struts2执行流程图
- 关于scanf("%s", &a) 和 scanf("%c", &a)标准输入的不同
- NULL NUL \0 EOF
- 3.2 Linux文件属性(3、4节)
- hql 模糊查询
- numpy.ceil()用法
- Jeston tx1 安装tensorflow r0.9 r1.0
- 图——广度优先搜索(Graph
- iOS应用程序内购/内付费
- 深入理解 Java 虚拟机--早期(编译期)优化
- Ubuntu编译安装LLVM