int main()
{
int arr[10] = {0};
int *p = arr;
int i = 0;
for(i=0; i<=11; i++)
{
//当指针指向的范围超出数组arr的范围时,p就是野指针
*(p++) = i;
}
return 0;
第四天
原创wx60d1a3d39a208 ©著作权
©著作权归作者所有:来自51CTO博客作者wx60d1a3d39a208的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
C语言学习第四天
一、运算符二、二进制操作符三、单目操作符
运算符 按位与 位取反 -
第四节 Docker概述
Docker
Docker docker 应用程序 -
linux 第四天
linux 第四天
linux 职场 休闲