[编程入门]自定义函数之字符串连接 摘要:解题思路:连接两个字符串,需要灵活运用C语言中C函数库中提供的处理字符串的函数,利用gets(str)来获取字符串,然后用strcat连接两个字符串。参考代码:#include<stdio.h>voi…… 题解列表 2022年06月11日 0 点赞 0 评论 274 浏览 评分:6.0
引入第三个一维字符数组 摘要:解题思路: 引入第三个一维字符数组,把两个字符数组的值依次赋值给第三个数组。参考代码:#include<stdio.h> #include<string.h> voi…… 题解列表 2022年10月13日 0 点赞 1 评论 200 浏览 评分:6.0
字符串连接 摘要:```cpp #include using namespace std; int main() { string s,t; getline(cin,s); getline(…… 题解列表 2023年09月18日 0 点赞 0 评论 220 浏览 评分:6.0
优质题解 C语言程序设计教程(第三版)课后习题8.6 (C语言代码) 摘要:解题思路和注意事项:思路:定义两个数组,分别用gets()函数输入,再用strcat()进行连接,最后用puts()函数进行输出即可。函数用法:gets()和puts()函数请见上一篇文章。 …… 题解列表 2018年04月27日 14 点赞 60 评论 16525 浏览 评分:6.3
[编程入门]自定义函数之字符串连接-题解(八行代码) 摘要: #include #include int main(){ char a[20],b[20]; scanf("%s%s",a,b); …… 题解列表 2020年02月13日 0 点赞 0 评论 824 浏览 评分:7.3
题目 1032: [编程入门]自定义函数之字符串连接 摘要:def fun(str_1, str_2): new_ste = str_1 + str_2 return new_stestr_1 = input()str_2 = input()rel…… 题解列表 2021年04月06日 0 点赞 0 评论 456 浏览 评分:7.3
自定义函数之字符串连接-题解(python) 摘要:参考代码:print(input()+input())#将两次输入的字符串相加并显示 …… 题解列表 2021年10月15日 0 点赞 0 评论 570 浏览 评分:7.3
自定义函数之字符串连接 摘要:解题思路:本题解题可用数组,两个数组连接将其内容分别赋予第三个数组 需要用到strlen求字符数组长度,可以先求长度,然后根据数组长度连接两个字符串. …… 题解列表 2021年11月20日 0 点赞 0 评论 1354 浏览 评分:7.3
[编程入门]自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int fun(char x[],char y[]){ strcat(x,y);}int m…… 题解列表 2022年01月27日 0 点赞 0 评论 489 浏览 评分:7.3
[编程入门]自定义函数之字符串连接,简单粗暴,通俗易懂。看一眼就懂 摘要:解题思路:前段时间看到大家对这题有争议,这次我来一无脑解法注意事项:注意把多于的0跳过参考代码:#include<stdio.h>#include<string.h>int main(){ cha…… 题解列表 2022年02月13日 0 点赞 0 评论 464 浏览 评分:7.3