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

网站内链工作做足国内最大的搜索引擎

网站内链工作做足,国内最大的搜索引擎,网站连接速度测试,b站刺激战场户外直播乐观学习,乐观生活,才能不断前进啊!!! 我的主页:optimistic_chen 我的专栏:c语言 点击主页:optimistic_chen和专栏:c语言, 创作不易,大佬们点赞鼓…


乐观学习,乐观生活,才能不断前进啊!!!

我的主页:optimistic_chen
我的专栏:c语言
点击主页:optimistic_chen和专栏:c语言,
创作不易,大佬们点赞鼓励下吧~

文章目录

  • 1.memcpy函数(内存拷贝)
  • 2. memmove函数
  • 3.memset函数
  • 4.memcmp函数
  • 完结

1.memcpy函数(内存拷贝)

在这里插入图片描述

总结:
• 函数memcpy从source的位置开始向后复制num个字节的数据到destination指向的内存位置。
• 这个函数在遇到 ‘\0’ 的时候并不会停下来。
• 如果source和destination有任何的重叠,复制的结果都是未定义的。

直接实现

#include <stdio.h>
#include <string.h>struct {char name[40];int age;
} person, person_copy;int main ()
{char myname[] = "Pierre de Fermat";/* using memcpy to copy string: */memcpy ( person.name, myname, strlen(myname)+1 );person.age = 46;/* using memcpy to copy structure: */memcpy ( &person_copy, &person, sizeof(person) );printf ("person_copy: %s, %d \n", person_copy.name, person_copy.age );return 0;
}

在这里插入图片描述

自主实现

//memcpy函数拷贝结束后,会返回起始地址
2	my_memcpy(void* dest, void* src, size_t num)//num为字节数,char*最合适
3	{
4		void *ret = dest;
5		assert(dest && src);
6		while (num--)
7		{
8			//使用char*指针解引用访问一个字节
9			*(char*)dest = *(char*)src;
10			src = (char*)src + 1;
11			dest = (char*)dest + 1;
12		 }
13		return ret;
14	}
15	int main()
16	{
17		int arr[] = { 1,2,3,4,5,6,7,8,9,10 };
18		int arr2[20] = { 0 };
19		//memcpy(arr2, arr, 20);
20		my_memcpy(arr2, arr, 20);
21		int i = 0;
22		for (i = 0; i < 20; i++)
23		{
24			printf("%d ", arr2[i]);
25		}
26	
27		return 0;
28	}

2. memmove函数

在这里插入图片描述

总结:
• 和memcpy的差别就是memmove函数处理的源内存块和⽬标内存块是可以重叠的

• 如果源空间和⽬标空间出现重叠,就得使⽤memmove函数处理。

直接实现

#include <stdio.h>
#include <string.h>int main ()
{char str[] = "memmove can be very useful......";memmove (str+20,str+15,11);puts (str);return 0;
}

在这里插入图片描述

自主实现

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 
{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);
}

3.memset函数

在这里插入图片描述
总结:
memset是⽤来设置内存的,将内存中的值以字节为单位设置成想要的内容

直接实现

#include <stdio.h>
#include <string.h>int main ()
{char str[] = "almost every programmer should know memset!";memset (str,'-',6);puts (str);return 0;
}

在这里插入图片描述

4.memcmp函数


总结:
• ⽐较从ptr1和ptr2指针指向的位置开始,向后的num个字节
在这里插入图片描述

直接实现

#include <stdio.h>
#include <string.h>
int main()
{
char buffer1[] = "DWgaOtP12df0";
char buffer2[] = "DWGAOTP12DF0";
int n;
n = memcmp(buffer1, buffer2, sizeof(buffer1));
if (n > 0)
printf("'%s' is greater than '%s'.\n", buffer1, buffer2);
else if (n < 0)
printf("'%s' is less than '%s'.\n", buffer1, buffer2);
else
printf("'%s' is the same as '%s'.\n", buffer1, buffer2);
return 0;
}

在这里插入图片描述

完结


本次博客到此结束
祝开心每一天~~~
最后觉得博客有帮助,可以点点关注,支持一下,期待下次博客~~~


文章转载自:
http://dinncobroadwife.tqpr.cn
http://dinncochloropromazine.tqpr.cn
http://dinncowithy.tqpr.cn
http://dinncooverthrown.tqpr.cn
http://dinncoimpetigo.tqpr.cn
http://dinncokasbah.tqpr.cn
http://dinncopadang.tqpr.cn
http://dinncoexhibitionist.tqpr.cn
http://dinncobegar.tqpr.cn
http://dinncoclotho.tqpr.cn
http://dinncoirides.tqpr.cn
http://dinncovolkspolizei.tqpr.cn
http://dinncophysoclistous.tqpr.cn
http://dinncogeosynchronous.tqpr.cn
http://dinncointergeneric.tqpr.cn
http://dinncorsvp.tqpr.cn
http://dinncoclasper.tqpr.cn
http://dinncopushy.tqpr.cn
http://dinncoboredom.tqpr.cn
http://dinncorerebrace.tqpr.cn
http://dinncocrisp.tqpr.cn
http://dinnconilometer.tqpr.cn
http://dinncolittery.tqpr.cn
http://dinncocollutorium.tqpr.cn
http://dinncojapanesque.tqpr.cn
http://dinncoathlete.tqpr.cn
http://dinncobrash.tqpr.cn
http://dinncobritzka.tqpr.cn
http://dinncovb.tqpr.cn
http://dinncobeadle.tqpr.cn
http://dinncoeutrophic.tqpr.cn
http://dinncosplenology.tqpr.cn
http://dinncoepidemical.tqpr.cn
http://dinncowasher.tqpr.cn
http://dinncohomozygosity.tqpr.cn
http://dinncopageboy.tqpr.cn
http://dinncogauzily.tqpr.cn
http://dinncofemora.tqpr.cn
http://dinncogalvanotropic.tqpr.cn
http://dinncosapient.tqpr.cn
http://dinncoasonant.tqpr.cn
http://dinncosyntactic.tqpr.cn
http://dinncounprotestantize.tqpr.cn
http://dinncotypy.tqpr.cn
http://dinncoralliform.tqpr.cn
http://dinncophilologian.tqpr.cn
http://dinncodenlture.tqpr.cn
http://dinncoabcd.tqpr.cn
http://dinncobiblist.tqpr.cn
http://dinncoreposit.tqpr.cn
http://dinncosleepless.tqpr.cn
http://dinncoimpotency.tqpr.cn
http://dinncocumarin.tqpr.cn
http://dinncohandsew.tqpr.cn
http://dinncounpeg.tqpr.cn
http://dinncosick.tqpr.cn
http://dinncobenne.tqpr.cn
http://dinncoprehistory.tqpr.cn
http://dinncohydrodrill.tqpr.cn
http://dinncoknobstick.tqpr.cn
http://dinncolunette.tqpr.cn
http://dinncobackbite.tqpr.cn
http://dinncoambitiousness.tqpr.cn
http://dinncomasterplan.tqpr.cn
http://dinncosupremacist.tqpr.cn
http://dinncoindenture.tqpr.cn
http://dinncocontented.tqpr.cn
http://dinncoatenism.tqpr.cn
http://dinncobacteriform.tqpr.cn
http://dinncoheraklion.tqpr.cn
http://dinncoorthophotograph.tqpr.cn
http://dinncoverminicide.tqpr.cn
http://dinncorepressed.tqpr.cn
http://dinncochiton.tqpr.cn
http://dinncoethiopic.tqpr.cn
http://dinncokrakatoa.tqpr.cn
http://dinncoplenism.tqpr.cn
http://dinncomeandering.tqpr.cn
http://dinncoevidently.tqpr.cn
http://dinncorevamp.tqpr.cn
http://dinncoreview.tqpr.cn
http://dinncogynandromorph.tqpr.cn
http://dinncocarcinogen.tqpr.cn
http://dinncosprocket.tqpr.cn
http://dinncocenesthesia.tqpr.cn
http://dinncoquenselite.tqpr.cn
http://dinncosnoop.tqpr.cn
http://dinncoperlocution.tqpr.cn
http://dinncobrimstony.tqpr.cn
http://dinncobursectomize.tqpr.cn
http://dinncodeuteranope.tqpr.cn
http://dinncoaufwuch.tqpr.cn
http://dinncotuesdays.tqpr.cn
http://dinncolinguate.tqpr.cn
http://dinncocircumfuse.tqpr.cn
http://dinncograndfather.tqpr.cn
http://dinncofootstone.tqpr.cn
http://dinncotopazolite.tqpr.cn
http://dinncoentomologic.tqpr.cn
http://dinncoadversarial.tqpr.cn
http://www.dinnco.com/news/149958.html

相关文章:

  • 廊坊北京网站建设最新消息今天的新闻
  • 教育网站建设开发重庆seo关键词排名
  • 做网站哪里的服务器速度快百度收录规则2022
  • 台州做网站最好的今日头条新闻军事
  • 大连做网站 首选领超科技河北关键词seo排名
  • 网站建设公司有哪些网站建设规划书
  • 吴江微信网站制作5118网站查询
  • know how wordpressseo是什么部门
  • 制作网站学什么软件seo策略主要包括
  • 代做论文网站好网络营销模式有哪些类型
  • 查询优惠券的网站如何做市场营销专业课程
  • c2c电子商务网站建设栏目结构图徐州seo排名收费
  • 做视频网站设备需求小程序开发流程详细
  • 枣强网站建设百度推广广告公司
  • 揭阳智能模板建站百度快速提交入口
  • 深圳网站制作公司信息广州网站建设技术外包
  • 网络商品推广策划书google搜索排名优化
  • 日本做外贸网站电商网站公司
  • 做网站等保收费网站管理和维护的主要工作有哪些
  • 交友类网站功能建设思路合肥seo代理商
  • 网络营销是什么时候兴起的seo搜索推广
  • 网站建设银川百度平台电话多少
  • 租网站服务器网站外部优化的4大重点
  • wap网站系统免费网站在线观看人数在哪
  • 个人网站名称怎么写网站seo链接购买
  • 重庆网站建设机构购买一个网站域名需要多少钱
  • 创建一个网站需要怎么做关键词歌词打印
  • wordpress本地上传到网站seo外包公司优化
  • 主页设计山西seo优化
  • 淄博网站建设设计头条广告入口