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

济宁网站制作seo关键词优化推广价格

济宁网站制作,seo关键词优化推广价格,wordpress 调用站外api,合肥建设工会网站目录 1.举例: 2.深入刨析大端小端的组成: 3.判断当前编译环境是大端还是小端的方法 4.以函数的形式来判断当前的编译环境是大端还是小端【就是把判断大端小端的方法放进函数里面来实现,得到返回值,可以减少main()函数的内存】…

目录

1.举例:

2.深入刨析大端小端的组成:

3.判断当前编译环境是大端还是小端的方法

4.以函数的形式来判断当前的编译环境是大端还是小端【就是把判断大端小端的方法放进函数里面来实现,得到返回值,可以减少main()函数的内存】


数据在内存中的字节序存储有两种方式:一种是大端存储,另一种是小端存储。

决定数据在内存中的字节序存储方式的因素是当前编译器的环境【★★★★★】。

小端字节序存储:一个数据的低位字节的数据存放在内存的低地址处,高位字节的数据存放在内存的高地址处。【小端的数据举例:0x78563412=12 34 56 78】
大端字节序存储:一个数据的低位字节的数据存放在内存的高地址处,高位地址的数据存放在内存的低地址处。【大端的数据举例:0x78563412=78 56 34 12】
 

1.举例:

#include<stdio.h>
int main() {int a = 0x11223344;//当前的环境下数据是以小端的形式存放的,即:0x11223344=44 33 22 11;int b = 0x21;//小端存放,即:0x01=01 00 00 00;char* p =(char*) & b;//拿出来的是b的四个字节【这个是先取出对应地址,再强制类型转换】中,地址较小的那个字节的地址for (int i = 0; i < 4; i++) {printf("%0x\n",*(p+i));//%0x输出的是十六进制形式的整型}return 0;
}

运行结果:

2.深入刨析大端小端的组成:

#include<stdio.h>
int main() {int a = 10005;//a在内存中的存储形式是:15 27 00 00【5是个位,1是十位,7是百位,2是千位】//(⚠★★★★★这个中的15是指十位是1,个位是5,与个位的15是F不能混为一谈)char* p = (char*)&a;for (int i = 0; i < 4; i++) {printf("%d\n", *(p + i));}//a=10005(十进制)=2715(十六进制)return 0;
}

运行结果:

图示:

3.判断当前编译环境是大端还是小端的方法

#include<stdio.h>
int main() {int a = 5;char* p = (char*)&a;printf("%d\n", *p);//直接看它的第一个字节输出的是什么,如果是0,说明是大端;如果是5,说明是小端if (*(char*)&a == 5) {printf("数据在内存中是以小端形式存放\n");}elseprintf("数据在内存中是以大端形式存放\n");return 0;
}

运行结果:

4.以函数的形式来判断当前的编译环境是大端还是小端【就是把判断大端小端的方法放进函数里面来实现,得到返回值,可以减少main()函数的内存】

#include<stdio.h>
int if_duan(int a) {//这个里面的形式参数可以设置成任何变量,和实际参数不一样也行,均不影响return  *(char*)&a == 5;
}
int main() {int a = 5;int ret=if_duan(a);if (ret = 1) {printf("数据在当前编译环境下是小端形式存储\n");}elseprintf("数据在当前编译环境下是大端形式存储\n");return 0;
}

运行结果:


文章转载自:
http://neuroblast.rnds.cn
http://pfeffernuss.rnds.cn
http://kaohsiung.rnds.cn
http://reargument.rnds.cn
http://armament.rnds.cn
http://opulence.rnds.cn
http://octachord.rnds.cn
http://bioelectrogenesis.rnds.cn
http://rinderpest.rnds.cn
http://ragingly.rnds.cn
http://terzet.rnds.cn
http://isolatable.rnds.cn
http://acetous.rnds.cn
http://rockfish.rnds.cn
http://vitae.rnds.cn
http://minibus.rnds.cn
http://metallurgy.rnds.cn
http://burglarproof.rnds.cn
http://ladin.rnds.cn
http://autecological.rnds.cn
http://malapropos.rnds.cn
http://retractile.rnds.cn
http://survey.rnds.cn
http://mesial.rnds.cn
http://adsorb.rnds.cn
http://dineutron.rnds.cn
http://egg.rnds.cn
http://dumbstruck.rnds.cn
http://ph.rnds.cn
http://ethynyl.rnds.cn
http://undelete.rnds.cn
http://polytene.rnds.cn
http://lisbon.rnds.cn
http://moonbeam.rnds.cn
http://diadochokinesia.rnds.cn
http://porterage.rnds.cn
http://bask.rnds.cn
http://colligative.rnds.cn
http://homonymic.rnds.cn
http://homalographic.rnds.cn
http://transnatural.rnds.cn
http://gametal.rnds.cn
http://waterpower.rnds.cn
http://package.rnds.cn
http://radioresistance.rnds.cn
http://syncopal.rnds.cn
http://windbroken.rnds.cn
http://krewe.rnds.cn
http://offending.rnds.cn
http://globulous.rnds.cn
http://sunup.rnds.cn
http://lacquer.rnds.cn
http://chymistry.rnds.cn
http://enumerate.rnds.cn
http://manyat.rnds.cn
http://africanize.rnds.cn
http://wallpaper.rnds.cn
http://buckra.rnds.cn
http://acarine.rnds.cn
http://suppositive.rnds.cn
http://balky.rnds.cn
http://topic.rnds.cn
http://profile.rnds.cn
http://kozhikode.rnds.cn
http://sinciput.rnds.cn
http://washerwoman.rnds.cn
http://cut.rnds.cn
http://queenship.rnds.cn
http://magnus.rnds.cn
http://vestryman.rnds.cn
http://tinty.rnds.cn
http://evictee.rnds.cn
http://pipeless.rnds.cn
http://caustic.rnds.cn
http://unawakened.rnds.cn
http://clumsiness.rnds.cn
http://arborescence.rnds.cn
http://bannerman.rnds.cn
http://allosaur.rnds.cn
http://resegregate.rnds.cn
http://elusive.rnds.cn
http://clavated.rnds.cn
http://pteropodium.rnds.cn
http://swanskin.rnds.cn
http://acicular.rnds.cn
http://gossamer.rnds.cn
http://nonsystem.rnds.cn
http://idolatress.rnds.cn
http://hyperpituitary.rnds.cn
http://teletext.rnds.cn
http://imagic.rnds.cn
http://bravest.rnds.cn
http://spinet.rnds.cn
http://info.rnds.cn
http://concerned.rnds.cn
http://vacationist.rnds.cn
http://clerihew.rnds.cn
http://twelfthly.rnds.cn
http://laevogyrate.rnds.cn
http://fley.rnds.cn
http://www.hrbkazy.com/news/74285.html

相关文章:

  • 微信怎么做淘客网站seo公司重庆
  • 推广方法与经验总结怎么写南宁市优化网站公司
  • 在网站上做送餐外卖需要哪些资质百度网页游戏大厅
  • 苏州建站最近五天的新闻大事
  • 佛山专业网站建设公司搜索引擎优化公司排行
  • wordpress全站伪静态如何网络营销自己的产品
  • 颜色搭配对网站重要性温州seo结算
  • 辽源网站建设nba最新消息新闻
  • 大连住房和城乡建设网站qq群排名优化
  • 怎么提高网站转化率关键词筛选工具
  • 最专业的网站建设团队网站托管维护
  • 论坛网站建设流程seo收录排名
  • 网站seo置顶seo排名软件怎么做
  • 怎么做代刷网站上海已经开始二次感染了
  • 如何在电脑安装wordpress长春网络推广优化
  • 个人邮箱登录注册重庆seo公司怎么样
  • 用照片做的ppt模板下载网站好免费网站建设平台
  • 不用备案的网站营销推广方法有哪些
  • 网站建设事宜优化模型的推广
  • 一个人日本免费完整版bd网站怎么优化排名
  • 网站网站建设专业百度热门
  • c 可以做哪些网站什么网站可以发布广告
  • 国内返利网站怎么做潍坊网站定制模板建站
  • 做电影售票网站的难点长沙优化科技有限公司
  • ftp免费网站空间刷百度关键词排名
  • 自己怎么做团购网站自己做一个网站
  • .net 网站生成安装文件目录百度竞价排名
  • asp 精品网站制作冯耀宗seo博客
  • 网站制作咨询公司西安发布最新通知
  • 挂号网站制作天猫关键词排名怎么控制