计算机显示0错误0警告,但是运行时却显示已停止工作,这是为什么?
#include "stdio.h"#include "string.h"
struct student2
{
float number;
char name[10];
}
main()
{
struct student2 x;
float *p_number;
char *p_name;
p_number=&x.number;
p_name=&x.name[10];
*p_number=100001L;
strcpy(p_name,"zhongxin");
printf("number:%ld\nname:%s\n",*p_number,*p_name);
}