小编use*_*368的帖子

为什么这个程序不适用于大于25个字符的输入?

这个程序适用于输入: "problem"

但停下来: "this is the problem,this is the problem,this is the problem"

为什么?

#include <stdio.h>

int main()
{
    char *p;
    gets(p);
    puts(p);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

有没有内存保护问题?

c pointers

-2
推荐指数
1
解决办法
119
查看次数

标签 统计

c ×1

pointers ×1