现在的位置: 首页 > 综合 > 正文

字符数组输出的问题

2013年10月14日 ⁄ 综合 ⁄ 共 164字 ⁄ 字号 评论关闭

输出字符数组的代码如下:

#include <stdio.h> 

#include <string.h>

main()

{

      char buf[128];

      memset(buf, 0 , sizeof(buf));

      strcpy(buf, "HELLO!");

      printf("result is : %s/n", buf);

}

抱歉!评论已关闭.