题解 1031: [编程入门]自定义函数之字符串反转

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

c++指针法(指针练习)

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ char arr[100]; cin.getline(arr,100……

自定义函数之字符串反转

摘要:解题思路:注意事项:参考代码:#include<stdio.h>void dx_print(char a[],int n){    int i=0;     for(i=n-1;i>=0;i--)  ……

自定义函数之字符串反转

摘要:解题思路:for循环,倒叙输出注意事项:参考代码:#include <stdio.h>#include <string.h> int main(){char a[100];int i,j;gets(a……

用循环来倒置字符串

摘要:解题思路:注意事项:参考代码:import java.util.ArrayList;import java.util.List;import java.util.Scanner;public clas……

c代码记录之自定义函数字符串反转

摘要:解题思路:输入输出做在主函数,自定义函数用于逆序排列字符数组,方法是首尾字符互换注意事项:参考代码:#include<stdio.h> #include<stdlib.h> int main() ……

自定义函数之字符串反转

摘要:解题思路:b[i] = a[len - i - 1]注意事项:strlen()函数(统计字符串长度)要有头文件#include <string.h>参考代码:#include <stdio.h>#in……

自定义函数之字符串反转

摘要:解题思路:这段代码中的mystrrev函数用于反转输入的字符串。在这个函数中,参数ch1被当作字符数组的指针来处理。当数组作为参数传递给函数时,实际上传递的是数组的地址,也就是指向数组第一个元素的指针……