[C语言]expected identifier or ‘(’ before ‘{’ token {

helloxkcd helloxkcd 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
#include <stdio.h>
#include <string.h>
{ /*报错行:expected identifier or ‘(’ before ‘{’ token */
char i[6];
scanf("%s",i);
int c = strlen(i);
printf("%d",c);
int a = 0;
while(a!=c)
{
if(a!=0)
printf(" ");
printf("%c",i[a]);
a++;
}
return 0;
}

作用是想让输入的字符倒叙输出.
环境:linux 3.10.0-693.11.6.el7.x86_64 gcc 4.8.5 20150623 (Red Hat 4.8.5-16)
...全文
评论 11
收藏 已收藏
分享
返回顶部
helloxkcd
其它技术问题 3,880 成员 9,044 内容