ubuntu linux下为什么这段代码不报错
#include<stdio.h>
#include<string.h>
int main(void)
{
char str[5];
strcpy(str,"hello world!") //这里应该报错
printf("strcpy over");
}
gcc -o test test.c //用gcc编译
./test // 执行
strcpy over //执行结果,但是没有提示strcpy错误,在windows下VS2005里虽然也能打印出strcpy over,但
是程序会崩溃,为何在ubuntu下没有提示错误?