64,654
社区成员
发帖
与我相关
我的任务
分享
# include <stdio.h>
#define SIZE 12
void sub(char * a, int t1, int t2)
{
char ch;
while (t1 < t2)
{
ch = *(a+t1);
*(a+t1) = *(a+t2);
*(a+t2) = ch;
t1++;
t2--;
}
}
void main()
{
char s[SIZE];
int I;
for(I=0; I<SIZE; I++)
s[I] = 'A'+I+32; //这里该是32,不该是321
sub(s, 7, SIZE-1);
for(I=0; I<SIZE; I++)
printf(" %c ",s[I]);
}