我无法找到哪里出了问题。当我运行该程序时,它显示“访问被拒绝”。
#include<stdio.h>
int main()
{
char arr[4][40] =
{ "array of c string",
"is fun to use",
"make sure to properly",
"tell the array size"
};
char *p = arr; /*Char-4-eg-Find-the-output.c:10:11: warning: initialization of 'char *' from
incompatible pointer type 'char (*)[40]' [-Wincompatible-pointer-types]*/
for (int i = 0; i < 100; i++)
{
printf("%c",*p );
p++;
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)