嵌入式C语言测试题

  • g9_115013
    了解作者
  • 172KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-13 10:06
    上传日期
嵌入式C语言测试题 呵呵 共勉
嵌入式C语言测试题.rar
  • 嵌入式C语言测试题.pdf
    190.8KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><meta name="generator" content="pdf2htmlEX"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/base.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/fancy.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/374198/raw.css"><script src="https://csdnimg.cn/release/download_crawler_static/js/compatibility.min.js"></script><script src="https://csdnimg.cn/release/download_crawler_static/js/pdf2htmlEX.min.js"></script><script>try{pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});}catch(e){}</script><title></title></head><body><div id="sidebar" style="display: none"><div id="outline"></div></div><div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/374198/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">&#32534;&#32773;&#25353;<span class="ff2 sc1 ls1">:<span class="ff1">&#38750;&#24120;&#22522;&#26412;&#20851;&#20110;<span class="ff3">C</span>&#35821;&#35328;&#30340;&#38382;&#39064;<span class="ff3">,</span>&#19968;&#20010;&#20449;&#24687;&#31867;<span class="ff3">(</span>&#35745;&#31639;&#26426;<span class="ff3">,</span>&#36164;&#35759;&#24037;&#31243;<span class="ff3">,</span>&#30005;&#23376;&#24037;&#31243;<span class="ff3 ls2">, <span class="_ _0"> </span></span>&#36890;&#20449;&#24037;&#31243;<span class="ff3">)</span>&#19987;&#19994;&#30340;&#26412;&#31185;&#27605;&#19994;&#29983;</span></span></div><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc1 ls1 ws0">&#24212;&#35813;&#36798;&#21040;&#30340;&#27700;&#24179;&#12290;&#39064;&#30446;&#19981;&#38590;<span class="ff3">,</span>&#20840;&#37096;&#37117;&#33021;&#24555;&#36895;&#22320;&#31572;&#23436;&#65292;&#24403;&#28982;&#20063;&#38656;&#35201;&#19968;&#23450;&#30340;&#30693;&#35782;&#20648;&#22791;&#12290;<span class="ff3"> </span></div><div class="t m0 x1 h3 y3 ff1 fs0 fc0 sc1 ls1 ws0">&#23545;&#20110;&#22823;&#22810;&#25968;&#20154;&#65292;&#25105;&#20204;&#39044;&#26399;&#20320;&#21487;&#33021;&#31572;&#38169;<span class="ff3 ls3 ws1"> <span class="_ _0"> </span>3) <span class="_ _0"> </span>4) <span class="_ _0"> </span>15)</span>&#39064;&#65292;&#25152;&#20197;&#31572;&#38169;<span class="_ _0"> </span><span class="ff3">3<span class="_"> </span></span>&#36947;&#20197;&#20869;&#30340;&#65292;&#25105;&#20204;&#35748;&#20026;&#20320;&#24456;&#26834;<span class="ff3"> </span></div><div class="t m0 x1 h3 y4 ff1 fs0 fc0 sc1 ls1 ws0">&#31572;&#38169;<span class="_ _0"> </span><span class="ff3">5<span class="_"> </span></span>&#36947;&#39064;&#20197;&#20869;&#65292;&#25105;&#20204;&#35748;&#20026;&#20320;&#36824;&#19981;&#38169;<span class="ff3">(</span>&#20320;&#36824;&#21487;&#33021;&#31572;&#38169;&#31532;<span class="_ _0"> </span><span class="ff3">9<span class="_"> </span></span>&#39064;<span class="ff3 ls4">) </span></div><div class="t m0 x1 h3 y5 ff1 fs0 fc0 sc1 ls1 ws0">&#22914;&#26524;&#20320;&#26377;<span class="_ _0"> </span><span class="ff3">6<span class="_"> </span></span>&#36947;&#20197;&#19978;&#30340;&#39064;&#30446;&#19981;&#33021;&#31572;&#23545;<span class="ff3">,</span>&#22522;&#26412;&#19978;&#25105;&#20204;&#37117;&#19981;&#22909;&#35828;&#20160;&#20040;&#20102;<span class="ff3 ls5">.... </span></div><div class="t m0 x1 h3 y6 ff1 fs0 fc0 sc1 ls1 ws0">&#32422;&#23450;<span class="ff3 ls5">: </span></div><div class="t m0 x1 h3 y7 ff3 fs0 fc0 sc1 ls6 ws2"> <span class="_ _0"> </span>1) <span class="_ _0"> </span><span class="ff1 ls1 ws0">&#19979;&#38754;&#30340;&#27979;&#35797;&#39064;&#20013;&#65292;&#35748;&#20026;&#25152;&#26377;&#24517;&#39035;&#30340;&#22836;&#25991;&#20214;&#37117;&#24050;&#32463;&#27491;&#30830;&#30340;&#21253;&#21547;&#20102;<span class="ff3"> </span></span></div><div class="t m0 x1 h3 y8 ff3 fs0 fc0 sc1 ls7 ws3"> <span class="_ _0"> </span>2)<span class="ff1 ls1 ws0">&#25968;&#25454;&#31867;&#22411;<span class="ff3 ls5"> <span class="_ _0"> </span> </span></span></div><div class="t m0 x1 h3 y9 ff3 fs0 fc0 sc1 ls8 ws4"> <span class="_ _0"> </span>char <span class="_ _0"> </span><span class="ff1 ls1 ws0">&#19968;<span class="_ _1"></span>&#20010;&#23383;&#33410;<span class="ff3 ls9 ws5"> 1 <span class="_ _2"></span>byte </span></span></div><div class="t m0 x1 h3 ya ff3 fs0 fc0 sc1 lsa ws6"> <span class="_ _0"> </span>int <span class="_ _0"> </span><span class="ff1 ls1 ws0">&#20004;&#20010;<span class="_ _1"></span>&#23383;&#33410;<span class="ff3 lsb ws7"> <span class="_ _0"> </span>2 byte (16<span class="_ _0"> </span></span>&#20301;&#31995;&#32479;&#65292;&#35748;&#20026;<span class="_ _3"></span>&#25972;&#22411;&#26159;<span class="_ _0"> </span><span class="ff3">2<span class="_"> </span></span>&#20010;&#23383;&#33410;<span class="ff3 ls4">) </span></span></div><div class="t m0 x1 h3 yb ff3 fs0 fc0 sc1 lsc ws8"> <span class="_ _0"> </span>long int <span class="_ _0"> </span><span class="ff1 ls1 ws0">&#22235;&#20010;&#23383;&#33410;</span><span class="ls9 ws5"> 4 <span class="_ _2"></span>by<span class="_ _1"></span>te </span></div><div class="t m0 x1 h3 yc ff3 fs0 fc0 sc1 lsd ws9"> <span class="_ _0"> </span>float <span class="_ _4"> </span><span class="ff1 ls1 ws0">&#22235;&#20010;&#23383;&#33410;<span class="_ _0"> </span></span><span class="ls9 wsa">4 b<span class="_ _3"></span>yet </span></div><div class="t m0 x1 h3 yd ff3 fs0 fc0 sc1 ls3 ws1"> <span class="_ _4"> </span>double <span class="_ _0"> </span><span class="ff1 ls1 ws0">&#20843;&#20010;&#23383;&#33410;</span><span class="ls9 ws5"> 8 <span class="_ _2"></span>byte </span></div><div class="t m0 x1 h3 ye ff3 fs0 fc0 sc1 lse wsb"> <span class="_ _4"> </span>long double <span class="_ _0"> </span><span class="ff1 ls1 ws0">&#21313;&#20010;&#23383;&#33410;</span><span class="lsf wsc"> 10 <span class="_ _2"></span>byte </span></div><div class="t m0 x1 h3 yf ff3 fs0 fc0 sc1 ls10 wsd"> <span class="_ _4"> </span>pointer <span class="_ _0"> </span><span class="ff1 ls1 ws0">&#20004;&#20010;&#23383;&#33410;</span><span class="ls9 ws5"> 2 <span class="_ _2"></span>byte(<span class="ff1 ls1 ws0">&#27880;&#24847;&#65292;<span class="ff3 ls11">16<span class="_"> </span></span><span class="ls0">&#20301;&#31995;<span class="_ _1"></span>&#32479;<span class="ff3 ls1">,<span class="ff1">&#22320;&#22336;&#24635;&#32447;&#21482;&#26377;<span class="_ _0"> </span></span><span class="ls11">16<span class="_"> </span></span><span class="ff1">&#20301;</span><span class="ls4">) </span></span></span></span></span></div><div class="t m0 x1 h2 y10 ff1 fs0 fc0 sc0 ls1 ws0">&#31532;<span class="_ _5"> </span><span class="ff2 sc1">1<span class="_"> </span></span>&#39064;<span class="ff2 sc1 ls12">: <span class="_ _4"> </span></span>&#32771;&#26597;&#23545;<span class="_ _3"></span><span class="ff2 sc1 ls13">volatile</span><span class="ls0">&#20851;&#38190;&#23383;&#30340;&#35748;&#35782;</span></div><div class="t m0 x1 h3 y11 ff3 fs0 fc0 sc1 ls14 ws0">#include&lt;setjmp.h&gt;<span class="_ _3"></span> </div><div class="t m0 x1 h3 y12 ff3 fs0 fc0 sc1 lsc ws8">static jmp_buf <span class="_ _0"> </span>buf; </div><div class="t m0 x1 h3 y13 ff3 fs0 fc0 sc1 ls10 ws8">main() <span class="_ _4"> </span> </div><div class="t m0 x1 h3 y14 ff3 fs0 fc0 sc1 ls3 ws0">{ </div><div class="t m0 x1 h3 y15 ff3 fs0 fc0 sc1 ls7 ws3"> <span class="_ _4"> </span>volatile <span class="_ _0"> </span>int b; </div><div class="t m0 x1 h3 y16 ff3 fs0 fc0 sc1 ls15 ws3"> <span class="_ _4"> </span>b =3; </div><div class="t m0 x1 h3 y17 ff3 fs0 fc0 sc1 lsc ws8"> <span class="_ _4"> </span>if(setjmp(buf)<span class="_ _3"></span>!=0) <span class="_ _0"> </span> </div><div class="t m0 x1 h3 y18 ff3 fs0 fc0 sc1 ls4 wse"> <span class="_ _4"> </span>{ </div><div class="t m0 x1 h3 y19 ff3 fs0 fc0 sc1 ls16 wsf"> <span class="_ _4"> </span>printf("%d ", b); <span class="_ _0"> </span> </div><div class="t m0 x1 h3 y1a ff3 fs0 fc0 sc1 ls15 ws10"> <span class="_ _4"> </span>exit(0); </div><div class="t m0 x1 h3 y1b ff3 fs0 fc0 sc1 ls4 wse"> <span class="_ _4"> </span>} </div><div class="t m0 x1 h3 y1c ff3 fs0 fc0 sc1 ls17 ws11"> <span class="_ _4"> </span>b=<span class="_ _3"></span>5; </div><div class="t m0 x1 h3 y1d ff3 fs0 fc0 sc1 ls16 wsf"> <span class="_ _4"> </span>long<span class="_ _3"></span>jmp(buf , 1); </div><div class="t m0 x1 h3 y1e ff3 fs0 fc0 sc1 ls4 wse">} <span class="_ _4"> </span> </div><div class="t m0 x1 h3 y1f ff1 fs0 fc0 sc1 ls1 ws0">&#35831;&#38382;&#65292;&#36825;&#27573;&#31243;&#24207;&#30340;&#36755;&#20986;&#26159;<span class="ff3"> </span></div><div class="t m0 x1 h3 y20 ff3 fs0 fc0 sc1 ls18 ws12">(a) 3 </div><div class="t m0 x1 h3 y21 ff3 fs0 fc0 sc1 ls18 ws12">(b) 5 </div><div class="t m0 x1 h3 y22 ff3 fs0 fc0 sc1 ls17 ws11">(c) 0 </div><div class="t m0 x1 h3 y23 ff3 fs0 fc0 sc1 ls19 ws0">(d) <span class="_ _0"> </span><span class="ff1 ls1">&#20197;&#19978;&#22343;&#19981;&#26159;<span class="ff3"> </span></span></div></div><div class="pi" data-data='{"ctm":[1.611639,0.000000,0.000000,1.611639,0.000000,0.000000]}'></div></div></body></html>
评论
    相关推荐