C语言指针数组问题,下面这个小程序为什么在vs编译通过,运行的时候没有出错? 30
#include<stdio.h>intmain(intargc,char*argv[]){char*buf[100]={0};sprintf(buf,"hello%d"...
#include <stdio.h>
int main(int argc, char *argv[])
{
char *buf[100] = {0};
sprintf(buf, "hello %d", 3);
printf("buf is %04X \n", buf);
printf("buf is %s \n", buf);
return 0;
} 展开
int main(int argc, char *argv[])
{
char *buf[100] = {0};
sprintf(buf, "hello %d", 3);
printf("buf is %04X \n", buf);
printf("buf is %s \n", buf);
return 0;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询