您的位置:首页 > 其它

数组指针的基本应用与细节注意

2016-12-04 17:04 225 查看
#include <stdio.h>
#include <stdlib.h>
int main()
{

int inum = 0;
int pos = 0;
int a[10];
int i = 0;

char *c_keyword[] = {
4000

"while",
"case",
"static",
"do",
'\0'
};
//判断,指针指向了一对垃圾数据
//NULL, 0 ,'\0' 这三种在windows上运行都可以可行的
for ( i= 0; c_keyword[i] != NULL ; i++)
{
printf("%s\n", c_keyword[i]);
}

system("pause");
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: