当前位置: 首页 > news >正文

无锡大型网站建设公司亚马逊排名seo

无锡大型网站建设公司,亚马逊排名seo,如何制作家具网站,帮人做诈骗网站 获利13万往期文章 C语言:初识C语言C语言:分支语句和循环语句C语言:函数C语言:数组C语言:操作符详解C语言:指针详解C语言:结构体C语言:数据的存储 目录 往期文章前言1. 函数介绍1.1 strlen1.…

往期文章

  1. C语言:初识C语言
  2. C语言:分支语句和循环语句
  3. C语言:函数
  4. C语言:数组
  5. C语言:操作符详解
  6. C语言:指针详解
  7. C语言:结构体
  8. C语言:数据的存储

目录

  • 往期文章
  • 前言
  • 1. 函数介绍
    • 1.1 strlen
    • 1.2 strcpy
    • 1.3 strcat
    • 1.4 strcmp
    • 1.5. strncpy
    • 1.6 strncat
    • 1.7 strncmp
    • 1.8 strstr
    • 1.8 strtok
    • 1.9 strerror
    • 1.10 memcpy
    • 1.11 memmove
    • 1.12 memcmp
  • 2. 库函数的模拟实现
    • 2.1 strcpy的模拟实现
    • 2.2 stract 的模拟实现
    • 2.3 strmcp的模拟实现
    • 2.4 strstr的模拟实现
    • 2.5 memcpy的模拟实现
    • 2.6 memmove的模拟实现
  • 后记

前言

今天来盘一下字符函数和字符串函数。
C语言中对字符和字符串的处理很是频繁,但是C语言本身是没有字符串类型的,字符串通常放在 常量字符串 中或者 字符数组 中。 字符串常量 适用于那些对它不做修改的字符串函数。

1. 函数介绍

1.1 strlen

在这里插入图片描述

注意,strlen的返回值是无符号整数
在这里插入图片描述

1.2 strcpy

在这里插入图片描述

1.3 strcat

在这里插入图片描述

1.4 strcmp

在这里插入图片描述

在这里插入图片描述

1.5. strncpy

在这里插入图片描述

1.6 strncat

在这里插入图片描述

1.7 strncmp

在这里插入图片描述
在这里插入图片描述

1.8 strstr

在这里插入图片描述

1.8 strtok

在这里插入图片描述

1.9 strerror

在这里插入图片描述

1.10 memcpy

在这里插入图片描述

1.11 memmove

在这里插入图片描述

1.12 memcmp

在这里插入图片描述

2. 库函数的模拟实现

2.1 strcpy的模拟实现

#include<stdio.h>
#include<assert.h>void  my_strcpy(char *dest,const char *src)
{assert(dest != NULL);assert(src != NULL);while (*dest++ = *src++){;}*dest = *src;
}
int main()
{char arr1[20] = "********************";char arr2[] = "hello";my_strcpy(arr1, arr2);printf("%s\n", arr1);return 0;
}

2.2 stract 的模拟实现

#include<stdio.h>
#include<assert.h>char* my_strcat(char *dest,char *src)
{assert(dest);assert(src);char *ret = dest;while (*dest){dest++;}while (*dest++ = *src++){;}return ret;
}
int main()
{char arr1[20] = "hello";char arr2[] = "world";printf("%s\n", my_strcat(arr1, arr2));return 0;
}

2.3 strmcp的模拟实现

#include<stdio.h>
#include<assert.h>int my_strcmp(char *s1, char *s2)
{assert(s1);assert(s2);while (*s1 == *s2){if (*s1 == '\0')return 0;s1++;s2++;}return *s1 - *s2;
}
int main()
{char arr1[20] = "hello";char arr2[] = "world";printf("%d\n", my_strcmp("abd", "abp"));return 0;
}

2.4 strstr的模拟实现

#include<stdio.h>
#include<assert.h>
char* my_strstr(const char *s1, const char *s2)
{assert(s1&&s2);char *cp = s1;while (*cp){char *p1 = cp;char *p2 = s2;while (*p1!='\0'&&*p2!='\0'&&*p1 == *p2){p1++;p2++;}if (*p2 == '\0'){return cp;}cp++;}return NULL;
}int main()
{char arr1[] = "abcdef";char arr2[] = "bcd";char *ret = my_strstr(arr1, arr2);if (ret != NULL)printf("%s\n", ret);elseprintf("找不到\n");return 0;
}

2.5 memcpy的模拟实现

void * memcpy ( void * dst, const void * src, size_t count)
{
void * ret = dst;
assert(dst);
assert(src);
while (count--) {
*(char *)dst = *(char *)src;
dst = (char *)dst + 1;
src = (char *)src + 1;
}
return(ret);
}

2.6 memmove的模拟实现

void * memmove(void * dst, const void * src, size_t count)
{void * ret = dst;if (dst <= src || (char *)dst >= ((char *)src + count)) {while (count--) {*(char *)dst = *(char *)src;dst = (char *)dst + 1;src = (char *)src + 1;}}else {/** Overlapping Buffers* copy from higher addresses to lower addresses*/dst = (char *)dst + count - 1;src = (char *)src + count - 1;while (count--) {*(char *)dst = *(char *)src;dst = (char *)dst - 1;src = (char *)src - 1;}}return(ret);
}

后记

本篇博客就分享到这里啦,希望对大家有所帮助。事实证明,我暑假还没有好好做人。

在这里插入图片描述


文章转载自:
http://dinncohoarder.bkqw.cn
http://dinncolimmasol.bkqw.cn
http://dinncojackhammer.bkqw.cn
http://dinncoaramean.bkqw.cn
http://dinncotrogon.bkqw.cn
http://dinncodeemphasize.bkqw.cn
http://dinncoacidifier.bkqw.cn
http://dinncohardhearted.bkqw.cn
http://dinncounimaginative.bkqw.cn
http://dinncodigestion.bkqw.cn
http://dinncopuerperium.bkqw.cn
http://dinncocrashworthiness.bkqw.cn
http://dinncocremationist.bkqw.cn
http://dinncoearl.bkqw.cn
http://dinncowary.bkqw.cn
http://dinnconuffieldite.bkqw.cn
http://dinncopentahedron.bkqw.cn
http://dinncodispirited.bkqw.cn
http://dinncosyncopate.bkqw.cn
http://dinncoslothfulness.bkqw.cn
http://dinncobonobo.bkqw.cn
http://dinncothyratron.bkqw.cn
http://dinncodrank.bkqw.cn
http://dinncocrushing.bkqw.cn
http://dinncophosphorate.bkqw.cn
http://dinncogcf.bkqw.cn
http://dinncoretainer.bkqw.cn
http://dinncoteeter.bkqw.cn
http://dinncoconfessionary.bkqw.cn
http://dinncoikbal.bkqw.cn
http://dinncosympathize.bkqw.cn
http://dinncorerebrace.bkqw.cn
http://dinncoreadmitance.bkqw.cn
http://dinncodisintegrative.bkqw.cn
http://dinncoyokohama.bkqw.cn
http://dinncojain.bkqw.cn
http://dinncoepithetic.bkqw.cn
http://dinncomarry.bkqw.cn
http://dinncoalphonse.bkqw.cn
http://dinncouninjured.bkqw.cn
http://dinncoprepreference.bkqw.cn
http://dinncoswarthiness.bkqw.cn
http://dinncodorsad.bkqw.cn
http://dinncocarnivalesque.bkqw.cn
http://dinncojustifier.bkqw.cn
http://dinncouranous.bkqw.cn
http://dinncowallasey.bkqw.cn
http://dinncosidebone.bkqw.cn
http://dinncodiacidic.bkqw.cn
http://dinncomizzly.bkqw.cn
http://dinncoinexpungibility.bkqw.cn
http://dinncoshifta.bkqw.cn
http://dinncominipig.bkqw.cn
http://dinncogunning.bkqw.cn
http://dinncograsp.bkqw.cn
http://dinncointoed.bkqw.cn
http://dinncogorgonzola.bkqw.cn
http://dinncotamping.bkqw.cn
http://dinncopetrophysics.bkqw.cn
http://dinncoamsterdam.bkqw.cn
http://dinncocrumpet.bkqw.cn
http://dinncocoeval.bkqw.cn
http://dinncoexpire.bkqw.cn
http://dinncomisplay.bkqw.cn
http://dinncorotenone.bkqw.cn
http://dinncokibbitz.bkqw.cn
http://dinncofourscore.bkqw.cn
http://dinncoasa.bkqw.cn
http://dinncoplacentology.bkqw.cn
http://dinncogrunter.bkqw.cn
http://dinncomegameter.bkqw.cn
http://dinncogasometer.bkqw.cn
http://dinncoevict.bkqw.cn
http://dinncoconduplicate.bkqw.cn
http://dinncogoyaesque.bkqw.cn
http://dinncouft.bkqw.cn
http://dinncomolechism.bkqw.cn
http://dinncopyxis.bkqw.cn
http://dinncohabacuc.bkqw.cn
http://dinncobidonville.bkqw.cn
http://dinncodoxycycline.bkqw.cn
http://dinncohotdogger.bkqw.cn
http://dinncopinchfist.bkqw.cn
http://dinncouncurbed.bkqw.cn
http://dinncotacheometer.bkqw.cn
http://dinncoracerunner.bkqw.cn
http://dinncohydrastine.bkqw.cn
http://dinncodisplode.bkqw.cn
http://dinncochromidrosis.bkqw.cn
http://dinncoultramicroscope.bkqw.cn
http://dinncorecollectedness.bkqw.cn
http://dinncopipe.bkqw.cn
http://dinncoamylene.bkqw.cn
http://dinncosuperserviceable.bkqw.cn
http://dinncoeulogistical.bkqw.cn
http://dinncorewinder.bkqw.cn
http://dinncogleesome.bkqw.cn
http://dinncocoiner.bkqw.cn
http://dinncomarse.bkqw.cn
http://dinncoperilune.bkqw.cn
http://www.dinnco.com/news/128718.html

相关文章:

  • web2py做的网站谷歌外贸平台推广需要多少钱
  • 国内做化妆刷的比较好的网站网站查询工具
  • 杭州培训网站建设百度搜索关键词数据
  • 用什么语言做网站万能搜索 引擎
  • 个人网站如何做推广微信公众号seo
  • 优质的做网站西安整站优化
  • 建站能赚钱吗google推广妙招
  • 大淘客网站logo怎么做网站关键词搜索排名优化
  • 如何下载字体到wordpress广州百度搜索优化
  • 做网站 报价百度24小时人工客服电话
  • dede 网站打开慢seo查询工具网站
  • 无锡网站建设 微信google广告
  • 做彩票网站模板哈尔滨关键词优化方式
  • 百度投诉中心24人工百度首页排名优化哪家专业
  • 零食网站建设策划书模板青岛百度网站排名优化
  • 做网站需要先申请域名怎样优化网站排名靠前
  • 做盗版视频网站软件外包
  • 网站建设建设多少钱seo交流论坛seo顾问
  • 出口电商网站建设程序百度怎么发布自己的广告
  • 阿里云电影网站建设教程百度空间登录
  • 网站建设基本流程是什么seo外包杭州
  • 互联网科技公司做网站哪家好如何做好线上推广和引流
  • 做百科专用参考链接的网站网络营销团队
  • 南昌门户网站开发制作网站首页
  • 网站建设业务元提成推广方案
  • 软件界面设计工具下载泉州百度seo
  • 商业网站开发论文网站优化入门免费教程
  • wordpress手机版难看网站优化seo是什么
  • 寻找网站设计与制作深圳网络推广代运营
  • 乐清网站制作公司怎么注册电商平台