#include <stdio.h> 【1】 //逆序输出任意字符串 void severse_string(char【2】str) { int len = strlen(str); char* left = str; char* right = str + len - 1; while (left < right) { char tmp = *left; *left = *right; *right = tmp; left++; right--; } } main() { char zf[100]; int a,b; 【3】; severse_string(【4】); 【5】; getchar(); }
#include <stdio.h> #include <string.h> //逆序输出任意字符串 void severse_string(char* str) { int len = strlen(str); char* left = str; char* right = str + len - 1; while (left < right) { char tmp = *left; *left = *right; *right = tmp; left++; right--; } } main() { char zf[100]; int a,b; gets(zf); severse_string(zf); puts(zf); getchar(); }
标签:right,int,zf,C语言,char,str,填空,left,逆序 From: https://www.cnblogs.com/xkdn/p/17132221.html