【C语言】创建一个函数,利用该函数将两个字符串连接起来
代码:
#include<stdio.h>
int fun(char c[], char d[])
{
int i, j;
for (i = ; c[i] != '\0'; i++);
for (j = ; d[j] != '\0'; j++)
{
c[i++] = d[j];
}
c[i] = '\0';
puts(c);
return c[];
}
int main()
{
char a[];
char b[];
gets_s(a);
gets_s(b);
fun(a, b);
return ;
}
【C语言】创建一个函数,利用该函数将两个字符串连接起来的更多相关文章
- ytu 1052: 写一函数,将两个字符串连接(水题,指针练习)
1052: 写一函数,将两个字符串连接 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 343 Solved: 210[Submit][Status][ ...
- Sql CLR创建一个简单的表值函数
1.创建面目: 2. 添加函数代码: using System; using System.Data.Sql; using Microsoft.SqlServer.Server; using Syst ...
- c程序设计语言_习题8-6_利用malloc()函数,重新实现c语言的库函数calloc()
The standard library function calloc(n,size) returns a pointer to n objects of size size , with the ...
- C语言 创建一个 txt 文件 bin输入字符 保存文件在工作文件夹里
int main(void) { char s[70]; FILE *fp; fp=fopen("123.txt","r"); if((fp=fopen(&qu ...
- C语言创建一个窗口提示
打开Vs2012[我的是2012] /* X下面这些东西并没有什么用... 就不改了用2013 2015都一样 当然 devC++ 还有最原始的那个vc6.0也都是可以的. 编译环境遇到了相关问题网上 ...
- 【C语言】将两个字符串连接起来
#include<stdio.h> int main() { ] = "I "; ] = "am a student"; int i, j, n; ...
- C语言strcmp()函数:比较两个字符串
strcmp() 函数用于对两个字符串进行比较(区分大小写). 头文件:string.h 语法/原型: int strcmp(const char* stri1,const char* str2); ...
- C语言strcat()函数:字符串连接(拼接)
C语言strcat()函数:字符串连接(拼接) C语言 strcat() 函数用来将两个字符串连接(拼接)起来. 头文件:string.h 语法/原型: char*strcat(char* str ...
- Python技法3:匿名函数、回调函数和高阶函数
1.定义匿名或内联函数 如果我们想提供一个短小的回调函数供sort()这样的函数用,但不想用def这样的语句编写一个单行的函数,我们可以借助lambda表达式来编写"内联"式的函数 ...
随机推荐
- window.resizeTo
概述 动态调整窗口的大小. 语法 window.resizeTo(aWidth, aHeight) 参数 aWidth 是一个整数,表示新的 outerWidth(单位:像素)(包括滚动条.窗口边框等 ...
- c语言 printf格式化输出
#include <iostream> #include<stdio.h> #include <cstring> using namespace std; int ...
- python3练习100题——029
原题链接:http://www.runoob.com/python/python-exercise-example29.html 题目:给一个不多于5位的正整数,要求:一.求它是几位数,二.逆序打印出 ...
- webpack之 plugin(插件)
plugin plugin是插件的意思,通常用来对某个现有的架构就行拓展 webpack中的插件,就是对webpack现有功能的各种扩展,比如打包优化,文件压缩等 loader和plugin区别 lo ...
- JavaScript的jQuery
JavaScript的jQuery 不通过JavaScript的原生代码,如document.getElementById("") 而是通过jQuery的$符号选择器. jQuer ...
- 【算法】状态压缩DP
状态压缩DP是什么? 答:利用位运算(位运算比加减乘除都快!)来记录状态,并实现动态规划. 适用于什么问题? 答:数据规模较小:不能使用简单的算法解决. 例题: 题目描述 糖果店的老板一共有M 种口味 ...
- python3 读取串口数据
python3 读取串口数据 demo import serial import time ser = serial.Serial("COM3",115200,timeout = ...
- django 外键使用select html
1.HTML代码: <td> <select id="depend_case" name="depend_case"> <opti ...
- IIS新类型文件500错误
时间过得太久,就真的会忘掉.在这里记录一下吧. 不得已重新安装系统,然后以前的配置都忘掉了.对新类型的文件.geojson 文件报错. 500错误. 首先反复调试MIME类型是否有问题, 再看映射是否 ...
- PP: Time series clustering via community detection in Networks
Improvement can be done in fulture:1. the algorithm of constructing network from distance matrix. 2. ...