#include <stdio.h>
#include <stdlib.h>
int main()
{
int t,i;
char s[13];
scanf("%d",&t);
while(t--){
getchar();
for(i=1;i<=11;i++){
scanf("%c",&s[i]);
}
s[12]='\0';
//printf("%c\n",s[1]);
printf("6");
for(i=7;i<=11;i++)printf("%c",s[i]);
printf("\n");
}
return 0;
}用字符数组就行
本文展示了一个使用C语言处理字符数组的例子程序。该程序通过读取整数t并随后读取11个字符到数组s中,然后输出特定格式的字符串。此例适用于初学者理解C语言中字符数组的基本操作。
375

被折叠的 条评论
为什么被折叠?



