自定义函数之字符串连接 摘要:解题思路:定义三个数组,两个数组存放输入的数组,最后一个数组存放最终的数组注意事项:利用string函数库中strlen函数计算出个数组中的元素个数参考代码:# include <stdio.h># …… 题解列表 2022年11月01日 0 点赞 1 评论 399 浏览 评分:0.0
引入第三个一维字符数组 摘要:解题思路: 引入第三个一维字符数组,把两个字符数组的值依次赋值给第三个数组。参考代码:#include<stdio.h> #include<string.h> voi…… 题解列表 2022年10月13日 0 点赞 1 评论 423 浏览 评分:6.0
自定义函数之字符串连接 摘要: #include using namespace std; void fun(string s1, string s2) { cout s1 >> …… 题解列表 2022年10月11日 0 点赞 0 评论 444 浏览 评分:0.0
1032: [编程入门]自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <string> using namespace std; int main() { stri…… 题解列表 2022年10月11日 0 点赞 0 评论 462 浏览 评分:0.0
1033-自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;string con(string s1,string s2)…… 题解列表 2022年10月05日 0 点赞 0 评论 596 浏览 评分:0.0
1032: [编程入门]自定义函数之字符串连接 (三行代码解决) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string a,b; cin>>a>>b; cout<<a<<b;}…… 题解列表 2022年09月17日 0 点赞 0 评论 451 浏览 评分:0.0
自定义函数之字符串连接(c语言)(指针) #自定义函数之字符串连接```c#define_CRT_SECURE_NO_WARNINGS1#include#includevoidAdd(char*test,char*str2,intconstlen1){char*p=test+len1;for(;*p=*str2++;p++)//*p=='\0 题解列表 2022年09月10日 0 点赞 0 评论 609 浏览 评分:0.0
编写题解 1032: [编程入门]自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include <string.h>void fcn(char *arr1, char *ar…… 题解列表 2022年09月05日 0 点赞 0 评论 477 浏览 评分:0.0
编写题解 1032: [编程入门]自定义函数之字符串连接(函数) 1.gets()函数用来从标准输入设备(键盘)读取字符串直到换行符结束,但换行符会被丢弃,然后在末尾添加'\0'字符。gets(c)将读取的字符串保存到c[]中。2.puts()函数把字符串输出到标准输出设备,将'\0'转换为回车换行。3.strcat(s1, 题解列表 2022年08月12日 0 点赞 0 评论 757 浏览 评分:8.0
编写题解 1032: [编程入门]自定义函数之字符串连接 摘要:解题思路:用strcat()函数注意事项:参考代码:#include <stdio.h> #include <string.h> int main() { char a[100…… 题解列表 2022年08月09日 0 点赞 0 评论 530 浏览 评分:0.0