这个不需要考虑空间的大小么?

#include<stdio.h>
#include<string.h>
void main()
{
 char a[3];
 char*str = "adgc";
 strcpy(a,str); 
 printf("%s  ",a);
}

程序运行的结果为什么是 adgc 呢? a的空间只有3个字符呢 ,为什么可以存放str呢?望求解。

posted @ 2014-05-22 08:50  joey_happy  阅读(92)  评论(0编辑  收藏  举报