vs2010与vc++6.0跑同一个程序,结果怎么不同???

来源:互联网 发布:通话视频软件 编辑:程序博客网 时间:2024/05/07 16:26

程序如下:

#include "stdafx.h"

#include<iostream>
#include<stdio.h>

int main(void)
{
//char s[]="123456789";
char d[]="123";
char s[]="123456789";
strcpy(d,s);
printf("%s,\n%s",d,s);
return 0;

}


vs2010结果:123456789,

                          123456789


vc++结果: 123456789,

                       56789

原创粉丝点击