我应该在这里得到堆栈粉碎错误。我没有得到它的原因是什么?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct mun
{
int len;
char str[0];
};
int main(void)
{
//char mp[8];
struct mun *p=malloc(sizeof(struct mun)+2);
p->len=8;
strcpy(p->str,"munjalllfff");
//strcpy(mp,"munjalllfff");
printf("%s\n",p->str);
//printf("%s\n",mp);
return 0;
}
如果可能,请解释或(主题名称或链接对我来说就足够了。)