全面严谨的字符串反转写法 摘要:解题思路:这个题目,我看了很多人的题解,只是简单的对半交换位置输出。这样的代码是不严谨的,题目说了输出不包含空格,所以要把空格去掉,剩下来的临时数组逆序输出。同时严谨代码还要把末尾可能有的换行符给去掉…… 题解列表 2026年07月19日 0 点赞 0 评论 21 浏览 评分:0.0
反向遍历法 摘要:解题思路:先保存,后逆向输出注意事项:处理换行符:fgets 会把输入的回车 \n 一起读入字符串,必须用 str[strcspn(str, "\n")] = '\0…… 题解列表 2026年04月02日 0 点赞 0 评论 235 浏览 评分:0.0
1031字符串反转 摘要:解题思路:注意事项:参考代码:#include"stdio.h"#include"string.h"int main(){ char …… 题解列表 2025年11月25日 1 点赞 1 评论 1618 浏览 评分:7.3
编写题解 1031: [编程入门]自定义函数之字符串反转 摘要: #include #include #include #include #include using namespace std;…… 题解列表 2025年04月03日 1 点赞 0 评论 1404 浏览 评分:0.0
自定义函数之字符串反转 摘要:解题思路: 使用getchar( )获取字符; 使用putcahr( )显示字符;注意事项: 输入一个字符串的首地址,可以…… 题解列表 2025年03月07日 1 点赞 0 评论 1272 浏览 评分:0.0
初学者思路,简单易懂 摘要:解题思路:从字符数组的两边往中间开始交换注意事项:参考代码: #include<stdio.h> #include<string.h> void fun(char*); int main()…… 题解列表 2024年12月29日 12 点赞 1 评论 1645 浏览 评分:10.0
多余的string函数 摘要:解题思路:#include<stdio.h> #include<string.h> int main(void) { char a[100]; gets(a); i…… 题解列表 2024年12月28日 2 点赞 0 评论 750 浏览 评分:0.0
字符串反转C语言题解 摘要:解题思路:使用字符串函数strlen获得字符串长度注意事项:记得加上预处理命令#include<string.h>参考代码:#include<stdio.h>#include <string.h>in…… 题解列表 2024年12月25日 1 点赞 0 评论 1165 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[100]; int i,j=0; scanf("%s",a); for(i…… 题解列表 2024年11月19日 0 点赞 0 评论 823 浏览 评分:0.0
大一新生用C语言编写的 摘要:解题思路:不知道为啥用scanf,printf就不行注意事项:参考代码:#include<stdio.h>#include<string.h>void fanh(char a[]);//函数的声明in…… 题解列表 2024年11月14日 1 点赞 0 评论 677 浏览 评分:0.0