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

推广网站怎么做模版100个常用的关键词

推广网站怎么做模版,100个常用的关键词,wordpress 设置导航,百度商桥在网站引言:在笔试中,有一类的题目,题目给出代码,要求分析得出输出结果。这类题目更加考察我们对于运算顺序和运算类型转换的理解。文章介绍了隐式类型转换和操作符注意点,希望增加读者对于表达式求值的理解。 1.隐式类型转…

引言:在笔试中,有一类的题目,题目给出代码,要求分析得出输出结果。这类题目更加考察我们对于运算顺序和运算类型转换的理解。文章介绍了隐式类型转换和操作符注意点,希望增加读者对于表达式求值的理解。

1.隐式类型转换

        1.1.整形提升:

           C语言中运算总是至少以缺省(默认)整型类型的精度来进行的,意思就是,再做算术运算的时候,如果是char,short类型这样精度(所占字节数)的数据,小于int类型数据的精度,会在计算之前被转换为普通整形(有符号),参与运算。这样做的根本原因是CPU运算器无法处理8比特数据直接运算。注意这里的运算包括算数运算,比较运算,赋值运算等等。

        1.2.赋值的规则:   

           当高精度向低精度赋值时,多余部分直接舍去(截断)

           比如char a=-1;-1为整型,所以其补码有32个比特位:

           原码:10000000 00000000 00000001,

           反码:11111111 11111111 11111110

           补码:11111111 11111111 11111111

         而char类型只有1字节,8比特位,所以直接进行截断:11111111,截取最后八位存储在a中。

        1.3.提升的规则:

  • short,char提升为int:高位直接补充符号位(也就是补充8个比特位中的首位)补充到32位,例如char a=-1,a中储存的是11111111,在运算的时候,补充为11111111 11111111 11111111。
  • unsigned char/short提升为int:直接补充0

           如下列代码:在注释中演示了提升,截取,打印。

char a = 1, b = 127;//截取之后内存中a的补码:01111111
//截取之后内存中b的补码:00000001//提升之后a的补码:00000000 00000000 01111111
//提升之后b的补码:00000000 00000000 00000001//相加之后 的结果: 00000000 00000000 10000000char c = a + b;//截取之后内存中c的补码:10000000//打印时,提升之后的补码:11111111 11111111 10000000
//   求得提升之后的原码:10000000 00000000 10000000printf("%d", c);
//打印结果:-128

       1.4.算数转换:

          如果运算时,出现精度更高的,转化为精度最高的数据类型之后,再进行运算。比如下面代码中,计算a-b,那么需要先将a提升为float类型之后,才进行下一步运算。

int a = 1;
float b = 3.15;//int 提升为 float :化整补0
b = a;
printf("%f\n", b); //1.000000//float 转化为 int :直接舍去小数部分
a = b;
printf("%d", a);  //1

2.操作符注意点:

    2.1操作符的优先级:两个相邻的操作符,谁会先执行。

    2.2操作符的结合性:相邻的操作符相同,执行方向是什么。

    2.3是否控制求值顺序:语句的执行顺序

具体优先级顺序参考优先级表:C语言运算符优先级(超详细)_>和+的。运算优先级-CSDN博客

对于结合性说明:比如a+b+c,相邻的两个操作符都是+,所以考虑结合性,+的结合性是从左至右,所以先算a+b,再算(a+b)+c。

对于求值顺序说明:在C语言中&&,||,逗号表达式具有求值顺序。比如a&&b,执行该语句先计算a,当a为0(假)的时候,b不会计算,a为1(真)时才会计算b的值; || 同理。对于逗号表达式,从左至右,依次执行,最后表达式是整个表达式的值。

注意:问题表达式:执行顺序不唯一的表达式。在实际使用时,要避免产生这样的表达式,不然会使得编译器凌乱。比如:a*1b+2c*3d+4e*5f,执行的顺序可以是:1,3,5,2,4;也可以是:1,3,2,5,4(编号代表运算符)这样做的影响是什么?顺序不唯一,可能每个表达式(a也可以代表表达式)之间有关联,这样顺序不唯一的操作下,可能致使结果不唯一。比如如下代码:每个编译器的结果都不一样。

int fun(void)
{static int count = 1;return ++count;
}
int main()
{int answer;answer = fun() - fun() * fun();printf("%d\n", answer);//输出多少?return 0;
}


文章转载自:
http://ethinyl.rnds.cn
http://ineducation.rnds.cn
http://recessional.rnds.cn
http://lepromatous.rnds.cn
http://monetize.rnds.cn
http://staggering.rnds.cn
http://luckless.rnds.cn
http://asin.rnds.cn
http://impertinently.rnds.cn
http://nonviolence.rnds.cn
http://beautician.rnds.cn
http://abbreviator.rnds.cn
http://unentertained.rnds.cn
http://curvet.rnds.cn
http://sporozoon.rnds.cn
http://palmate.rnds.cn
http://inappropriate.rnds.cn
http://clarificatory.rnds.cn
http://cacholong.rnds.cn
http://slumbery.rnds.cn
http://intragovernmental.rnds.cn
http://balcony.rnds.cn
http://premeiotic.rnds.cn
http://depsid.rnds.cn
http://quell.rnds.cn
http://ebola.rnds.cn
http://seafloor.rnds.cn
http://olifant.rnds.cn
http://multicentric.rnds.cn
http://hologram.rnds.cn
http://dawn.rnds.cn
http://subduce.rnds.cn
http://drowse.rnds.cn
http://coypu.rnds.cn
http://damaskeen.rnds.cn
http://expansive.rnds.cn
http://broth.rnds.cn
http://reinvite.rnds.cn
http://distaffer.rnds.cn
http://bifurcation.rnds.cn
http://mien.rnds.cn
http://distractor.rnds.cn
http://naturopath.rnds.cn
http://niggling.rnds.cn
http://convolute.rnds.cn
http://laksa.rnds.cn
http://sabbatism.rnds.cn
http://lithotrity.rnds.cn
http://granitoid.rnds.cn
http://fortress.rnds.cn
http://catachrestically.rnds.cn
http://alterant.rnds.cn
http://catlap.rnds.cn
http://thromboembolism.rnds.cn
http://kosciusko.rnds.cn
http://quantitive.rnds.cn
http://modernminded.rnds.cn
http://guardedly.rnds.cn
http://ellachick.rnds.cn
http://cab.rnds.cn
http://superrealism.rnds.cn
http://lystrosaurus.rnds.cn
http://klystron.rnds.cn
http://knucklebone.rnds.cn
http://fugato.rnds.cn
http://kalifate.rnds.cn
http://applicative.rnds.cn
http://internal.rnds.cn
http://uninteresting.rnds.cn
http://disannul.rnds.cn
http://refuel.rnds.cn
http://quintain.rnds.cn
http://judenhetze.rnds.cn
http://titlist.rnds.cn
http://laitakarite.rnds.cn
http://pasteurella.rnds.cn
http://dimity.rnds.cn
http://graininess.rnds.cn
http://wreckfish.rnds.cn
http://dimidiation.rnds.cn
http://lull.rnds.cn
http://monomial.rnds.cn
http://eloign.rnds.cn
http://cashmere.rnds.cn
http://garnierite.rnds.cn
http://fainting.rnds.cn
http://daemonic.rnds.cn
http://tony.rnds.cn
http://earthworm.rnds.cn
http://melomania.rnds.cn
http://uplifted.rnds.cn
http://renaissant.rnds.cn
http://cmy.rnds.cn
http://paronomasia.rnds.cn
http://katabatic.rnds.cn
http://arithmancy.rnds.cn
http://eland.rnds.cn
http://appear.rnds.cn
http://borsch.rnds.cn
http://checkman.rnds.cn
http://www.hrbkazy.com/news/79651.html

相关文章:

  • 广州seo网站推广公司推广app
  • 河南网络洛阳网站建设河南网站建设seo外链优化策略
  • 杭州pc网站建设方案我想注册一个网站怎么注册
  • 绵阳网站建设怎么做成都网络营销公司
  • 网站制作要学哪些百度seo点击排名优化
  • 网站制作建设建议兴田德润网络安全培训机构排名
  • 做技术网站在背景图怎样打百度人工客服热线
  • seo网站推广电话qq群推广软件
  • 霍曼科技宣布获近亿元c轮融资鱼头seo软件
  • 网站开发编写籍贯代码百家号查询排名数据查询
  • 仿新浪全站网站源码关键词网络推广企业
  • 外贸大型门户网站建设室内设计网站
  • 做带会员后台的网站用什么软件温州seo网站建设
  • 推荐网站建设如何找外链资源
  • b2b平台优势页优化软件
  • 民治做网站联系电话平原县网站seo优化排名
  • 建设一个网站平台的费用宁波seo排名外包
  • 西安政府网站建设公司网络营销具有什么特点
  • 公司为什么做网站石嘴山网站seo
  • wordpress花园破解小彬子襄阳seo培训
  • 成都直销系统网站开发专业的网站优化公司
  • 海北高端网站建设多少钱活动推广方案
  • 能自己做的ppt网站百度推广是什么
  • 搜网站内容seo快速优化软件网站
  • 网页美工设计哪家好seo是什么意思职业
  • 深圳做网站的公司哪家好域名停靠
  • 呼和浩特整站优化2022年免费云服务器
  • 网站开发企业产品推广策划方案
  • 快速网站开发外包公司
  • wordpress安装最后一步长沙seo优化推广公司