#include <stdio.h>
#include <string.h>

int main()
{
char str[] = "abcde";
char temp[] = "";
int i, j;
for(i = 0; i<5; i++)
{
temp[i] = str [4-i];
}
strcpy(str, temp);
printf("%s\n",str);
}

结果:

# gcc test_point.c -o test_point
# ./test_point
str:edcba

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2022-01-04
  • 2022-01-03
猜你喜欢
  • 2022-12-23
  • 2021-11-27
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-08-05
相关资源
相似解决方案