c语言高手请进:帮我指出错误,再好解释一下错误的原因,先谢谢了!
#include"stdio.h"charb[4]={"morning","industry","beautiful","english"};voidmain(){int...
#include "stdio.h"
char b[4]={"morning","industry","beautiful","english"};
void main()
{
int i;
char *x;
x=&b[2];
for(i=0;i<4;i++)
{
puts(x);
x++;
}
} 展开
char b[4]={"morning","industry","beautiful","english"};
void main()
{
int i;
char *x;
x=&b[2];
for(i=0;i<4;i++)
{
puts(x);
x++;
}
} 展开
展开全部
#include "stdio.h"
char *b[4]={"morning","industry","beautiful","english"};
void main()
{
int i;
char *x;
for(i=0;i<4;i++)
{
x=b[i];
puts(x);
}
getchar();
}
*b[4]是四个字符串
b[i]已经代表了每一个字符串的首地址
这样就可以输出
morning
industry
beautiful
english
char *b[4]={"morning","industry","beautiful","english"};
void main()
{
int i;
char *x;
for(i=0;i<4;i++)
{
x=b[i];
puts(x);
}
getchar();
}
*b[4]是四个字符串
b[i]已经代表了每一个字符串的首地址
这样就可以输出
morning
industry
beautiful
english
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询