<!DOCTYPE HTML>
<html lang="zh-CN">

<head>

<meta charset="utf-8">
<meta name="keywords" content="函数练习, 机械,制图,stm32,机器人">
<meta name="description" content="函数练习一.填空编写函数,实现在n个升序的整数中查找是否有key值的折半查找法。

include &lt;stdio.h>

int mid_find(int a[], int count, int key)
{ ">

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit|ie-stand|ie-comp">
<meta name="mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>函数练习 | 步六孤</title>
<link rel="icon" type="image/png" href="/favicon.png">

<link rel="stylesheet" type="text/css" href="/libs/awesome/css/all.css">
<link rel="stylesheet" type="text/css" href="/libs/materialize/materialize.min.css">
<link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
<link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
<link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
<link rel="stylesheet" type="text/css" href="/css/matery.css">
<link rel="stylesheet" type="text/css" href="/css/my.css">

<script src="/libs/jquery/jquery.min.js"></script>

<link rel="alternate" href="/atom.xml" title="步六孤" type="application/atom+xml">
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css"></head>

<body>

<header class="navbar-fixed">
<nav id="headNav" class="bg-color nav-transparent">
    <div id="navContainer" class="nav-wrapper head-container">
        <div class="brand-logo">
            <a href="/" class="waves-effect waves-light">
                <div>
                    
                    <img src="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/%E6%87%92%E5%8A%A0%E8%BD%BD/%E6%87%92%E5%8A%A0%E8%BD%BD.gif" data-original="/medias/logo.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">步六孤</span>
                </div>
            </a>
        </div>
        

<div id="mobile-nav" class="side-nav sidenav">

<div class="mobile-head bg-color">
    
    <img src="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/%E6%87%92%E5%8A%A0%E8%BD%BD/%E6%87%92%E5%8A%A0%E8%BD%BD.gif" data-original="/medias/logo.png" class="logo-img circle responsive-img">
    
    <div class="logo-name">步六孤</div>
    <div class="logo-desc">
        
        个人技术博客
        
    </div>
</div>



<ul class="menu-list mobile-menu-list">
    
    <li class="m-nav-item">
  
    <a href="/" class="waves-effect waves-light">
        
            <i class="fa-fw fas fa-home"></i>
        
        首页
    </a>
      
    </li>
    
    <li class="m-nav-item">
  
    <a href="/tags" class="waves-effect waves-light">
        
            <i class="fa-fw fas fa-tags"></i>
        
        标签
    </a>
      
    </li>
    
    <li class="m-nav-item">
  
    <a href="/categories" class="waves-effect waves-light">
        
            <i class="fa-fw fas fa-bookmark"></i>
        
        分类
    </a>
      
    </li>
    
    <li class="m-nav-item">
  
    <a href="/archives" class="waves-effect waves-light">
        
            <i class="fa-fw fas fa-archive"></i>
        
        归档
    </a>
      
    </li>
    
    <li class="m-nav-item">
  
    <a href="/about" class="waves-effect waves-light">
        
            <i class="fa-fw fas fa-user-circle"></i>
        
        关于
    </a>
      
    </li>
    
    <li class="m-nav-item">
  
    <a href="/contact" class="waves-effect waves-light">
        
            <i class="fa-fw fas fa-comments"></i>
        
        Contact
    </a>
      
    </li>
    
    <li class="m-nav-item">
  
    <a href="/friends" class="waves-effect waves-light">
        
            <i class="fa-fw fas fa-address-book"></i>
        
        友情链接
    </a>
      
    </li>
    
    
    <li><div class="divider"></div></li>
    <li>
        <a href="https://github.com/buliugu-tech" class="waves-effect waves-light" target="_blank">
            <i class="fab fa-github-square fa-fw"></i>Fork Me
        </a>
    </li>
    

</div>

    </div>

    
        <style>
.nav-transparent .github-corner {
    display: none !important;
}

.github-corner {
    position: absolute;
    z-index: 10;
    top: 0;
    right: 0;
    border: 0;
    transform: scale(1.1);
}

.github-corner svg {
    color: #0f9d58;
    fill: #fff;
    height: 64px;
    width: 64px;
}

.github-corner:hover .octo-arm {
    animation: a 0.56s ease-in-out;
}

.github-corner .octo-arm {
    animation: none;
}

@keyframes a {
    0%,
    to {
        transform: rotate(0);
    }
    20%,
    60% {
        transform: rotate(-25deg);
    }
    40%,
    80% {
        transform: rotate(10deg);
    }
}

</style>

<a href="https://github.com/buliugu-tech" class="github-corner tooltipped hide-on-med-and-down" target="_blank"
data-tooltip="Fork Me" data-position="left" data-delay="50">

<svg viewBox="0 0 250 250" aria-hidden="true">
    <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
    <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
          fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
    <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
          fill="currentColor" class="octo-body"></path>
</svg>

    
</nav>

</header>

<div class="bg-cover pd-header post-cover" style="background-image: url('/medias/featureimages/16.jpg')">

<div class="container" style="right: 0px;left: 0px;">
    <div class="row">
        <div class="col s12 m12 l12">
            <div class="brand">
                <div class="description center-align post-title">
                    函数练习
                </div>
            </div>
        </div>
    </div>
</div>

</div>

<main class="post-container content">


<link rel="stylesheet" href="/libs/tocbot/tocbot.css">

<style>

#articleContent h1::before,
#articleContent h2::before,
#articleContent h3::before,
#articleContent h4::before,
#articleContent h5::before,
#articleContent h6::before {
    display: block;
    content: " ";
    height: 100px;
    margin-top: -100px;
    visibility: hidden;
}

#articleContent :focus {
    outline: none;
}

.toc-fixed {
    position: fixed;
    top: 64px;
}

.toc-widget {
    width: 345px;
    padding-left: 20px;
}

.toc-widget .toc-title {
    margin: 35px 0 15px 0;
    padding-left: 17px;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.5rem;
}

.toc-widget ol {
    padding: 0;
    list-style: none;
}

#toc-content {
    height: calc(100vh - 250px);
    overflow: auto;
}

#toc-content ol {
    padding-left: 10px;
}

#toc-content ol li {
    padding-left: 10px;
}

#toc-content .toc-link:hover {
    color: #42b983;
    font-weight: 700;
    text-decoration: underline;
}

#toc-content .toc-link::before {
    background-color: transparent;
    max-height: 25px;
}

#toc-content .is-active-link {
    color: #42b983;
}

#toc-content .is-active-link::before {
    background-color: #42b983;
}

#floating-toc-btn {
    position: fixed;
    right: 15px;
    bottom: 76px;
    padding-top: 15px;
    margin-bottom: 0;
    z-index: 998;
}

#floating-toc-btn .btn-floating {
    width: 48px;
    height: 48px;
}

#floating-toc-btn .btn-floating i {
    line-height: 48px;
    font-size: 1.4rem;
}

</style>
<div class="row">

<div id="main-content" class="col s12 m12 l9">
    <!-- 文章内容详情 -->

<div id="artDetail">

<div class="card">
    <div class="card-content article-info">
        <div class="row tag-cate">
            <div class="col s7">
                
                <div class="article-tag">
                    
                        <a href="/tags/C/">
                            <span class="chip bg-color">C</span>
                        </a>
                    
                        <a href="/tags/%E5%87%BD%E6%95%B0/">
                            <span class="chip bg-color">函数</span>
                        </a>
                    
                </div>
                
            </div>
            <div class="col s5 right-align">
                
                <div class="post-cate">
                    <i class="fas fa-bookmark fa-fw icon-category"></i>
                    
                        <a href="/categories/C%E8%AF%AD%E8%A8%80/" class="post-category">
                            C语言
                        </a>
                    
                </div>
                
            </div>
        </div>

        <div class="post-info">
            
            <div class="post-date info-break-policy">
                <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                2019-12-11
            </div>
            

            
            <div class="post-date info-break-policy">
                <i class="far fa-calendar-check fa-fw"></i>更新日期:&nbsp;&nbsp;
                2020-01-25
            </div>
            

            
            <div class="info-break-policy">
                <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                1.6k
            </div>
            

            
            <div class="info-break-policy">
                <i class="far fa-clock fa-fw"></i>阅读时长:&nbsp;&nbsp;
                7 分
            </div>
            
            
            
                <div id="busuanzi_container_page_pv" class="info-break-policy">
                    <i class="far fa-eye fa-fw"></i>阅读次数:&nbsp;&nbsp;
                    <span id="busuanzi_value_page_pv"></span>
                </div>
            
        </div>
        
    </div>
    <hr class="clearfix">
    <div class="card-content article-card-content">
        <div id="articleContent">
            <h1 id="函数练习"><a href="#函数练习" class="headerlink" title="函数练习"></a>函数练习</h1><h2 id="一-填空"><a href="#一-填空" class="headerlink" title="一.填空"></a>一.填空</h2><p>编写函数,实现在n个升序的整数中查找是否有key值的折半查找法。</p>

<span class="token keyword">int</span> <span class="token function">mid_find</span><span class="token punctuation">(</span><span class="token keyword">int</span> a<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token keyword">int</span> count<span class="token punctuation">,</span> <span class="token keyword">int</span> key<span class="token punctuation">)</span>
<span class="token punctuation">{</span> <span class="token comment" spellcheck="true">//count个元素a[i]中查是否有key,若有,返回值为该元素的下标,若无,返回值-1</span>

<span class="token keyword">int</span> left<span class="token punctuation">,</span>right<span class="token punctuation">,</span>mid<span class="token punctuation">;</span>
left<span class="token operator">=</span>_________<span class="token punctuation">;</span>     right<span class="token operator">=</span>_________<span class="token punctuation">;</span>    
<span class="token keyword">while</span><span class="token punctuation">(</span> _________ <span class="token punctuation">)</span>
<span class="token punctuation">{</span>
    mid<span class="token operator">=</span><span class="token punctuation">(</span>left<span class="token operator">+</span>right<span class="token punctuation">)</span><span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">;</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span>mid<span class="token punctuation">]</span><span class="token operator">==</span>key<span class="token punctuation">)</span> <span class="token keyword">return</span> mid<span class="token punctuation">;</span>
    <span class="token keyword">else</span> <span class="token keyword">if</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span>mid<span class="token punctuation">]</span><span class="token operator">></span>key<span class="token punctuation">)</span>_________<span class="token punctuation">;</span>
    <span class="token keyword">else</span> left<span class="token operator">=</span>__________<span class="token punctuation">;</span>                
<span class="token punctuation">}</span>
<span class="token keyword">return</span> __________ <span class="token punctuation">;</span>            

<span class="token punctuation">}</span>
<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>

<span class="token keyword">int</span> a<span class="token punctuation">[</span><span class="token number">10</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">4</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">,</span><span class="token number">7</span><span class="token punctuation">,</span><span class="token number">8</span><span class="token punctuation">,</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
<span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%d\n"</span><span class="token punctuation">,</span><span class="token function">mid_find</span><span class="token punctuation">(</span>a<span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">,</span><span class="token number">18</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>    

<p>正确答案为:</p>

<span class="token macro property">#<span class="token directive keyword">include</span> <span class="token string"><stdio.h></span></span>
<span class="token keyword">int</span> <span class="token function">mid_find</span><span class="token punctuation">(</span><span class="token keyword">int</span> a<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token keyword">int</span> count<span class="token punctuation">,</span> <span class="token keyword">int</span> key<span class="token punctuation">)</span>
<span class="token punctuation">{</span>                            <span class="token comment" spellcheck="true">//count个元素a[i]中查是否有key,若有,返回值为该元素的下标,若无,返回值-1</span>
    <span class="token keyword">int</span> left<span class="token punctuation">,</span>right<span class="token punctuation">,</span>mid<span class="token punctuation">;</span>
    left<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>     right<span class="token operator">=</span>count<span class="token number">-1</span><span class="token punctuation">;</span>    
    <span class="token keyword">while</span><span class="token punctuation">(</span>left<span class="token operator"><=</span>right<span class="token punctuation">)</span>
    <span class="token punctuation">{</span>
        mid<span class="token operator">=</span><span class="token punctuation">(</span>left<span class="token operator">+</span>right<span class="token punctuation">)</span><span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span>mid<span class="token punctuation">]</span><span class="token operator">==</span>key<span class="token punctuation">)</span> <span class="token keyword">return</span> mid<span class="token punctuation">;</span>
        <span class="token keyword">else</span> <span class="token keyword">if</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span>mid<span class="token punctuation">]</span><span class="token operator">></span>key<span class="token punctuation">)</span> right<span class="token operator">=</span>mid<span class="token number">-1</span><span class="token punctuation">;</span>
        <span class="token keyword">else</span> left<span class="token operator">=</span>mid<span class="token operator">+</span><span class="token number">1</span><span class="token punctuation">;</span>                
    <span class="token punctuation">}</span>
    <span class="token keyword">return</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">;</span>            
<span class="token punctuation">}</span>    
<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">int</span> a<span class="token punctuation">[</span><span class="token number">10</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">4</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">,</span><span class="token number">7</span><span class="token punctuation">,</span><span class="token number">8</span><span class="token punctuation">,</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%dn"</span><span class="token punctuation">,</span><span class="token function">mid_find</span><span class="token punctuation">(</span>a<span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">,</span><span class="token number">8</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>    
<span class="token punctuation">}</span>    

<h2 id="二-编写函数">二.编写函数</h2><p>尝试自己编写一个判断是否素数的函数,返回值为1,表示是素数,为0,则不是素数。并在main函数中编写合适的代码来验证函数功能是否正确。</p>
<p>正确答案:</p>

<span class="token macro property">#<span class="token directive keyword">include</span> <span class="token string"><stdio.h></span></span>
<span class="token macro property">#<span class="token directive keyword">include</span> <span class="token string"><math.h></span></span>
<span class="token keyword">int</span> <span class="token function">find</span><span class="token punctuation">(</span><span class="token keyword">int</span> m<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
    <span class="token keyword">int</span> i <span class="token operator">=</span> <span class="token number">2</span><span class="token punctuation">;</span>
    <span class="token keyword">while</span><span class="token punctuation">(</span>i<span class="token operator"><=</span><span class="token function">sqrt</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token keyword">double</span><span class="token punctuation">)</span>m<span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token punctuation">{</span>
        <span class="token keyword">if</span><span class="token punctuation">(</span>m<span class="token operator">&</span>i<span class="token operator">==</span><span class="token number">0</span><span class="token punctuation">)</span> <span class="token keyword">return</span> <span class="token number">0</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span><span class="token punctuation">(</span>m<span class="token operator">&</span>i<span class="token operator">!=</span><span class="token number">0</span><span class="token punctuation">)</span> i<span class="token operator">++</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
    <span class="token keyword">return</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%d"</span><span class="token punctuation">,</span><span class="token function">find</span><span class="token punctuation">(</span><span class="token number">7</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<h2 id="三-选择">三.选择</h2><p>有以下程序:</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdlib.h></span></span>
<span class="token keyword">void</span> <span class="token function">fun</span><span class="token punctuation">(</span><span class="token keyword">int</span> <span class="token operator"></span>p1<span class="token punctuation">,</span> <span class="token keyword">int</span> <span class="token operator"></span>p2<span class="token punctuation">,</span> <span class="token keyword">int</span> <span class="token operator">*</span>s<span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    s<span class="token operator">=</span><span class="token punctuation">(</span><span class="token keyword">int</span><span class="token operator">*</span><span class="token punctuation">)</span><span class="token function">malloc</span><span class="token punctuation">(</span><span class="token keyword">sizeof</span><span class="token punctuation">(</span><span class="token keyword">int</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment" spellcheck="true">//问内存要了int大小的变量区空间,地址钥匙由s保存</span>
    <span class="token operator"></span>s<span class="token operator">=</span><span class="token operator"></span>p1<span class="token operator">+</span><span class="token operator">*</span>p2<span class="token punctuation">;</span>
    <span class="token function">free</span><span class="token punctuation">(</span>s<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment" spellcheck="true">//malloc方式要的存储空间,要记得自己释放掉,free就是办理check out的举动</span>
<span class="token punctuation">}</span>            <span class="token comment" spellcheck="true">//如果该函数里没有s=...和free两句,结果是?        41</span>
<span class="token function">main</span> <span class="token punctuation">(</span> <span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">int</span> a<span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">,</span> b<span class="token operator">=</span><span class="token number">40</span><span class="token punctuation">,</span><span class="token operator">*</span>q<span class="token operator">=</span><span class="token operator">&</span>a<span class="token punctuation">;</span>
    <span class="token function">fun</span><span class="token punctuation">(</span> <span class="token operator">&</span>a <span class="token punctuation">,</span> <span class="token operator">&</span>b<span class="token punctuation">,</span> q<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">printf</span><span class="token punctuation">(</span> <span class="token string">"%dn"</span><span class="token punctuation">,</span> <span class="token operator">*</span>q<span class="token punctuation">)</span> <span class="token punctuation">;</span>    
<span class="token punctuation">}</span>

<p>程序运行后的输出结果是? C</p>
<p>A) 42 B) 0 C) 1 D) 41</p>
<h2 id="四-选择">四.选择</h2><p>有如下调用语句func(rec1,rec2+rec3,(rec4,rec5));则该函数调用语句中,含有的实参个数是? A</p>
<p>A 3 B 4 C 5 D 语法错误</p>
<p>分析:</p>
<p>(rec4,rec5)是逗号表达式,它的值是rec5的值。所以该函数调用语句含有的实参个数是3。</p>
<p>(3+5,6+8)称为逗号表达式,其求解过程先表达式1,后表达式2,整个表达式值是表达式2的值。</p>
<h2 id="五-简答">五.简答</h2><pre class=" language-c"><span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token keyword">int</span> <span class="token function">f1</span><span class="token punctuation">(</span><span class="token keyword">int</span> x<span class="token punctuation">,</span><span class="token keyword">int</span> y<span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token keyword">return</span> x<span class="token operator">></span>y<span class="token operator">?</span>x<span class="token punctuation">:</span>y<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token comment" spellcheck="true">//返回较大的值</span>
<span class="token keyword">int</span> <span class="token function">f2</span><span class="token punctuation">(</span><span class="token keyword">int</span> x<span class="token punctuation">,</span><span class="token keyword">int</span> y<span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token keyword">return</span> x<span class="token operator">></span>y<span class="token operator">?</span>y<span class="token punctuation">:</span>x<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token comment" spellcheck="true">//返回较小的值</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>

<span class="token keyword">int</span> a<span class="token operator">=</span><span class="token number">4</span><span class="token punctuation">,</span>b<span class="token operator">=</span><span class="token number">3</span><span class="token punctuation">,</span>c<span class="token operator">=</span><span class="token number">5</span><span class="token punctuation">,</span>d<span class="token operator">=</span><span class="token number">2</span><span class="token punctuation">,</span>e<span class="token punctuation">,</span>f<span class="token punctuation">,</span>g<span class="token punctuation">;</span>
e<span class="token operator">=</span><span class="token function">f2</span><span class="token punctuation">(</span><span class="token function">f1</span><span class="token punctuation">(</span>a<span class="token punctuation">,</span>b<span class="token punctuation">)</span><span class="token punctuation">,</span><span class="token function">f1</span><span class="token punctuation">(</span>c<span class="token punctuation">,</span>d<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>  
f<span class="token operator">=</span><span class="token function">f1</span><span class="token punctuation">(</span><span class="token function">f2</span><span class="token punctuation">(</span>a<span class="token punctuation">,</span>b<span class="token punctuation">)</span><span class="token punctuation">,</span><span class="token function">f2</span><span class="token punctuation">(</span>c<span class="token punctuation">,</span>d<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>        
g<span class="token operator">=</span>a<span class="token operator">+</span>b<span class="token operator">+</span>c<span class="token operator">+</span>d<span class="token operator">-</span>e<span class="token operator">-</span>f<span class="token punctuation">;</span>
<span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%d,%d,%d\n"</span><span class="token punctuation">,</span>e<span class="token punctuation">,</span>f<span class="token punctuation">,</span>g<span class="token punctuation">)</span><span class="token punctuation">;</span>

<p>则程序输出为?</p>
<p>答案:</p>
<p>4,3,7</p>
<h2 id="六-简答">六.简答</h2><p>程序运行结果?</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token macro property">#<span class="token directive keyword">define</span> N 20</span>
<span class="token keyword">void</span> <span class="token function">fun</span><span class="token punctuation">(</span><span class="token keyword">int</span> a<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span><span class="token keyword">int</span> n<span class="token punctuation">,</span><span class="token keyword">int</span> m<span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">int</span> i<span class="token punctuation">,</span>j<span class="token punctuation">;</span>
    <span class="token keyword">for</span><span class="token punctuation">(</span>i<span class="token operator">=</span>m<span class="token punctuation">;</span>i<span class="token operator">>=</span>n<span class="token punctuation">;</span>i<span class="token operator">--</span><span class="token punctuation">)</span>a<span class="token punctuation">[</span>i<span class="token operator">+</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token operator">=</span>a<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">;</span>     <span class="token comment" spellcheck="true">//将a[n]到a[m+1]的数右移一位,注意:a[n]赋值给a[n+1]后就结束了</span>
<span class="token punctuation">}</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">int</span> i<span class="token punctuation">,</span>a<span class="token punctuation">[</span>N<span class="token punctuation">]</span><span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">4</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">,</span><span class="token number">7</span><span class="token punctuation">,</span><span class="token number">8</span><span class="token punctuation">,</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
    <span class="token function">fun</span><span class="token punctuation">(</span>a<span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">9</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">for</span><span class="token punctuation">(</span>i<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>i<span class="token operator"><</span><span class="token number">5</span><span class="token punctuation">;</span>i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%d"</span><span class="token punctuation">,</span>a<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>  <span class="token comment" spellcheck="true">//输出a[]前五位</span>
<span class="token punctuation">}</span>

<p>答案:</p>
<p>12334</p>
<h2 id="七-简答">七.简答</h2><p>程序运行结果?</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token keyword">void</span> <span class="token function">fun</span><span class="token punctuation">(</span><span class="token keyword">char</span> <span class="token operator"></span>a<span class="token punctuation">,</span> <span class="token keyword">char</span> <span class="token operator"></span>b<span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    a<span class="token operator">=</span>b<span class="token punctuation">;</span>  <span class="token punctuation">(</span><span class="token operator"></span>a<span class="token punctuation">)</span><span class="token operator">++</span><span class="token punctuation">;</span>   <span class="token comment" spellcheck="true">//a指向一个地址,b指向一个地址,a=b后,就相当于a指向b指向的地址,a自增,就是a指向的地址自增,而a最初指向的地址并不受影响。</span>
<span class="token punctuation">}</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">char</span> c1<span class="token operator">=</span><span class="token string">'A'</span><span class="token punctuation">,</span>c2<span class="token operator">=</span><span class="token string">'a'</span><span class="token punctuation">,</span><span class="token operator"></span>p1<span class="token punctuation">,</span><span class="token operator"></span>p2<span class="token punctuation">;</span>
    p1<span class="token operator">=</span><span class="token operator">&</span>c1<span class="token punctuation">;</span>  p2<span class="token operator">=</span><span class="token operator">&</span>c2<span class="token punctuation">;</span> 
    <span class="token function">fun</span><span class="token punctuation">(</span>p1<span class="token punctuation">,</span>p2<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%c%cn"</span><span class="token punctuation">,</span>c1<span class="token punctuation">,</span>c2<span class="token punctuation">)</span><span class="token punctuation">;</span>   
<span class="token punctuation">}</span>

<p>答案:</p>
<p>Ab</p>
<h2 id="八-简答">八.简答</h2><p>程序运行输入:3,abcde<回车>,结果?</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><string.h></span></span>
<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token keyword">void</span> <span class="token function">move</span><span class="token punctuation">(</span><span class="token keyword">char</span> <span class="token operator">*</span>str<span class="token punctuation">,</span> <span class="token keyword">int</span> n<span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">char</span> temp<span class="token punctuation">;</span>  <span class="token keyword">int</span> i<span class="token punctuation">;</span>
    temp<span class="token operator">=</span>str<span class="token punctuation">[</span>n<span class="token number">-1</span><span class="token punctuation">]</span><span class="token punctuation">;</span>   <span class="token comment" spellcheck="true">//暂存str[]最后一位的值</span>
    <span class="token keyword">for</span><span class="token punctuation">(</span>i<span class="token operator">=</span>n<span class="token number">-1</span><span class="token punctuation">;</span>i<span class="token operator">></span><span class="token number">0</span><span class="token punctuation">;</span>i<span class="token operator">--</span><span class="token punctuation">)</span> str<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token operator">=</span>str<span class="token punctuation">[</span>i<span class="token number">-1</span><span class="token punctuation">]</span><span class="token punctuation">;</span>   <span class="token comment" spellcheck="true">//将str[]左移一位</span>
    str<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token operator">=</span>temp<span class="token punctuation">;</span>     <span class="token comment" spellcheck="true">//给上一步没有产生变化的第一位赋最初str[]最后一位的值</span>
<span class="token punctuation">}</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">char</span> s<span class="token punctuation">[</span><span class="token number">50</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">int</span> n<span class="token punctuation">,</span>i<span class="token punctuation">,</span>z<span class="token punctuation">;</span>
    <span class="token function">scanf</span><span class="token punctuation">(</span><span class="token string">"%d,%s"</span><span class="token punctuation">,</span><span class="token operator">&</span>n<span class="token punctuation">,</span>s<span class="token punctuation">)</span><span class="token punctuation">;</span>  
    z<span class="token operator">=</span><span class="token function">strlen</span><span class="token punctuation">(</span>s<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">for</span><span class="token punctuation">(</span>i<span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">;</span>i<span class="token operator"><=</span>n<span class="token punctuation">;</span>i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token function">move</span><span class="token punctuation">(</span>s<span class="token punctuation">,</span>z<span class="token punctuation">)</span><span class="token punctuation">;</span>  <span class="token comment" spellcheck="true">//左移n=3位</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%sn"</span><span class="token punctuation">,</span>s<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<p>答案:</p>
<p>cdeab</p>
<h2 id="九-选择">九.选择</h2><p>函数fun定义为void fun(char ch,float x){ },则下列调用正确的是?(void是没有返回值) D</p>
<p>A fun(“abc”,3.0); B t=fun(‘D’,16.5); C fun(‘65’,2.8); D fun(32,32);</p>
<p>分析:</p>
<p>A,D项中,”abc”,’65’均含有一个以上的字符,为字符串,而函数中定义的是一个字符,故错误。</p>
<p>B项中,fun函数返回的是一个void值,不可用于赋值。</p>
<h2 id="十-简答">十.简答</h2><p>程序运行结果?</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token keyword">void</span> <span class="token function">sum</span><span class="token punctuation">(</span><span class="token keyword">int</span> a<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    a<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token operator">=</span>a<span class="token punctuation">[</span><span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token operator">+</span>a<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">;</span>   <span class="token comment" spellcheck="true">//将前一位的值与后一位的值相加后得到的结果赋给引用值</span>
<span class="token punctuation">}</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">int</span> a<span class="token punctuation">[</span><span class="token number">10</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">4</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">,</span><span class="token number">7</span><span class="token punctuation">,</span><span class="token number">8</span><span class="token punctuation">,</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">}</span><span class="token punctuation">;</span>
    <span class="token function">sum</span><span class="token punctuation">(</span><span class="token operator">&</span>a<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>        <span class="token comment" spellcheck="true">//相当于a[2]=a[1]+a[3],即a[2]=2+4=6</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%dn"</span><span class="token punctuation">,</span>a<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span> 
<span class="token punctuation">}</span>

<p>答案:</p>
<p>6</p>
<h2 id="十一-简答">十一.简答</h2><p>程序运行输入:1234<回车>,结果?</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token keyword">int</span> <span class="token function">sub</span><span class="token punctuation">(</span><span class="token keyword">int</span> n<span class="token punctuation">)</span>
<span class="token punctuation">{</span> 
    <span class="token keyword">return</span><span class="token punctuation">(</span>n<span class="token operator">/</span><span class="token number">10</span><span class="token operator">+</span>n<span class="token operator">%</span><span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">;</span>   <span class="token comment" spellcheck="true">//输出 n对10取余的值加上n被10整除得到的值</span>
<span class="token punctuation">}</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">int</span> x<span class="token punctuation">,</span>y<span class="token punctuation">;</span> <span class="token function">scanf</span><span class="token punctuation">(</span><span class="token string">"%d"</span><span class="token punctuation">,</span><span class="token operator">&</span>x<span class="token punctuation">)</span><span class="token punctuation">;</span>
    y<span class="token operator">=</span><span class="token function">sub</span><span class="token punctuation">(</span><span class="token function">sub</span><span class="token punctuation">(</span><span class="token function">sub</span><span class="token punctuation">(</span>x<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>   <span class="token comment" spellcheck="true">//套娃运算,逐个代入计算可得结果,最后输出 1+9=10</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%dn"</span><span class="token punctuation">,</span>y<span class="token punctuation">)</span><span class="token punctuation">;</span> 
<span class="token punctuation">}</span>

<p>答案:</p>
<p>10</p>
<h2 id="十二-简答">十二.简答</h2><p>程序运行结果?</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token keyword">void</span> <span class="token function">sum</span><span class="token punctuation">(</span><span class="token keyword">int</span> <span class="token operator">*</span>a<span class="token punctuation">)</span> 
<span class="token punctuation">{</span> 
    a<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token operator">=</span>a<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">;</span> 
<span class="token punctuation">}</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">int</span> aa<span class="token punctuation">[</span><span class="token number">10</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">4</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">,</span><span class="token number">7</span><span class="token punctuation">,</span><span class="token number">8</span><span class="token punctuation">,</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">}</span><span class="token punctuation">,</span>i<span class="token punctuation">;</span> 
    <span class="token keyword">for</span><span class="token punctuation">(</span>i<span class="token operator">=</span><span class="token number">2</span><span class="token punctuation">;</span>i<span class="token operator">>=</span><span class="token number">0</span><span class="token punctuation">;</span>i<span class="token operator">--</span><span class="token punctuation">)</span> <span class="token function">sum</span><span class="token punctuation">(</span><span class="token operator">&</span>aa<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span> 
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%dn"</span><span class="token punctuation">,</span>aa<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span> 
<span class="token punctuation">}</span>

<p>答案:</p>
<p>4</p>
<h2 id="十三-简答">十三.简答</h2><p>程序运行结果?</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token keyword">int</span> <span class="token function">f</span><span class="token punctuation">(</span><span class="token keyword">int</span> b<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">)</span> 
<span class="token punctuation">{</span>     
    <span class="token keyword">int</span> i<span class="token punctuation">,</span>j<span class="token punctuation">,</span>s<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">for</span><span class="token punctuation">(</span>j<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>j<span class="token operator"><</span><span class="token number">4</span><span class="token punctuation">;</span>j<span class="token operator">++</span><span class="token punctuation">)</span> 
    <span class="token punctuation">{</span>    
        i<span class="token operator">=</span>j<span class="token punctuation">;</span>  
        <span class="token keyword">if</span><span class="token punctuation">(</span>i<span class="token operator">></span><span class="token number">2</span><span class="token punctuation">)</span>i<span class="token operator">=</span><span class="token number">3</span><span class="token operator">-</span>j<span class="token punctuation">;</span> 
        s<span class="token operator">+</span><span class="token operator">=</span>b<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">[</span>j<span class="token punctuation">]</span><span class="token punctuation">;</span>    <span class="token comment" spellcheck="true">//注意这条语句和if语句独立</span>
    <span class="token punctuation">}</span>
    <span class="token keyword">return</span> s<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">int</span> a<span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">4</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">4</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">6</span><span class="token punctuation">,</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token number">12</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">}</span><span class="token punctuation">;</span>   <span class="token comment" spellcheck="true">//最终实现结果是a0+a1+a2+a0</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%dn"</span><span class="token punctuation">,</span><span class="token function">f</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<p>答案:</p>
<p>16</p>
<h2 id="十四-简答">十四.简答</h2><p>程序运行结果?</p>

<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><string.h></span></span>
<span class="token macro property">#<span class="token directive keyword">include</span><span class="token string"><stdio.h></span></span>
<span class="token keyword">char</span> <span class="token operator"></span><span class="token function">ss</span><span class="token punctuation">(</span><span class="token keyword">char</span> <span class="token operator"></span>s<span class="token punctuation">)</span> 
<span class="token punctuation">{</span> 
    <span class="token keyword">return</span> s<span class="token operator">+</span><span class="token function">strlen</span><span class="token punctuation">(</span>s<span class="token punctuation">)</span><span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">;</span> 
<span class="token punctuation">}</span>
<span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>    
    <span class="token keyword">char</span> <span class="token operator"></span>p<span class="token punctuation">,</span><span class="token operator"></span>str<span class="token operator">=</span><span class="token string">"abcdefgh"</span><span class="token punctuation">;</span> 
    p<span class="token operator">=</span><span class="token function">ss</span><span class="token punctuation">(</span>str<span class="token punctuation">)</span><span class="token punctuation">;</span>    <span class="token comment" spellcheck="true">//p=s+4,此时p指向的是字符串中'e'的地址</span>
    <span class="token function">printf</span><span class="token punctuation">(</span><span class="token string">"%sn"</span><span class="token punctuation">,</span>p<span class="token punctuation">)</span><span class="token punctuation">;</span>   <span class="token comment" spellcheck="true">//输出p往后的字符,直到'0'结束</span>
<span class="token punctuation">}</span>

<p>答案:</p>
<p>efgh</p>

        </div>
        <hr/>

        

<div class="reprint" id="reprint-statement">
    
        <div class="reprint__author">
            <span class="reprint-meta" style="font-weight: bold;">
                <i class="fas fa-user">
                    文章作者:
                </i>
            </span>
            <span class="reprint-info">
                <a href="http://stepsix.cn" rel="external nofollow noreferrer">步六孤</a>
            </span>
        </div>
        <div class="reprint__type">
            <span class="reprint-meta" style="font-weight: bold;">
                <i class="fas fa-link">
                    文章链接:
                </i>
            </span>
            <span class="reprint-info">
                <a href="http://stepsix.cn/2019/12/11/c-han-shu-lian-xi/">http://stepsix.cn/2019/12/11/c-han-shu-lian-xi/</a>
            </span>
        </div>
        <div class="reprint__notice">
            <span class="reprint-meta" style="font-weight: bold;">
                <i class="fas fa-copyright">
                    版权声明:
                </i>
            </span>
            <span class="reprint-info">
                本博客所有文章除特別声明外,均采用
                <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                许可协议。转载请注明来源
                <a href="http://stepsix.cn" target="_blank">步六孤</a>
                !
            </span>
        </div>
    
</div>

<script async defer>
  document.addEventListener("copy", function (e) {
    let toastHTML = '<span>复制成功,请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
    M.toast({html: toastHTML})
  });

  function navToReprintStatement() {
    $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
  }
</script>
        <div class="tag_share" style="display: block;">
            <div class="post-meta__tag-list" style="display: inline-block;">
                
                    <div class="article-tag">
                        
                            <a href="/tags/C/">
                                <span class="chip bg-color">C</span>
                            </a>
                        
                            <a href="/tags/%E5%87%BD%E6%95%B0/">
                                <span class="chip bg-color">函数</span>
                            </a>
                        
                    </div>
                
            </div>
            <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">

<div id="article-share">



<div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享!</p>"></div>
<script src="/libs/share/js/social-share.min.js"></script>



</div>

            </div>
        </div>
        
            <style>
#reward {
    margin: 40px 0;
    text-align: center;
}

#reward .reward-link {
    font-size: 1.4rem;
    line-height: 38px;
}

#reward .btn-floating:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
}

#rewardModal {
    width: 320px;
    height: 350px;
}

#rewardModal .reward-title {
    margin: 15px auto;
    padding-bottom: 5px;
}

#rewardModal .modal-content {
    padding: 10px;
}

#rewardModal .close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.3rem;
    line-height: 20px;
    cursor: pointer;
}

#rewardModal .close:hover {
    color: #ef5350;
    transform: scale(1.3);
    -moz-transform:scale(1.3);
    -webkit-transform:scale(1.3);
    -o-transform:scale(1.3);
}

#rewardModal .reward-tabs {
    margin: 0 auto;
    width: 210px;
}

.reward-tabs .tabs {
    height: 38px;
    margin: 10px auto;
    padding-left: 0;
}

.reward-content ul {
    padding-left: 0 !important;
}

.reward-tabs .tabs .tab {
    height: 38px;
    line-height: 38px;
}

.reward-tabs .tab a {
    color: #fff;
    background-color: #ccc;
}

.reward-tabs .tab a:hover {
    background-color: #ccc;
    color: #fff;
}

.reward-tabs .wechat-tab .active {
    color: #fff !important;
    background-color: #22AB38 !important;
}

.reward-tabs .alipay-tab .active {
    color: #fff !important;
    background-color: #019FE8 !important;
}

.reward-tabs .reward-img {
    width: 210px;
    height: 210px;
}

</style>

<div id="reward">

<a href="#rewardModal" class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red">赏</a>

<!-- Modal Structure -->
<div id="rewardModal" class="modal">
    <div class="modal-content">
        <a class="close modal-close"><i class="fas fa-times"></i></a>
        <h4 class="reward-title">你的赏识是我前进的动力</h4>
        <div class="reward-content">
            <div class="reward-tabs">
                <ul class="tabs row">
                    <li class="tab col s6 alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                    <li class="tab col s6 wechat-tab waves-effect waves-light"><a href="#wechat">微 信</a></li>
                </ul>
                <div id="alipay">
                    <img src="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/%E6%87%92%E5%8A%A0%E8%BD%BD/%E6%87%92%E5%8A%A0%E8%BD%BD.gif" data-original="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/pay/alipay.jpg" class="reward-img" alt="支付宝打赏二维码">
                </div>
                <div id="wechat">
                    <img src="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/%E6%87%92%E5%8A%A0%E8%BD%BD/%E6%87%92%E5%8A%A0%E8%BD%BD.gif" data-original="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/pay/wechatpay.png" class="reward-img" alt="微信打赏二维码">
                </div>
            </div>
        </div>
    </div>
</div>

</div>

<script>

$(function () {
    $('.tabs').tabs();
});

</script>

        
    </div>
</div>










    <style>
.valine-card {
    margin: 1.5rem auto;
}

.valine-card .card-content {
    padding: 20px 20px 5px 20px;
}

#vcomments textarea {
    box-sizing: border-box;
    background: url("/medias/comment_bg.png") 100% 100% no-repeat;
}

#vcomments p {
    margin: 2px 2px 10px;
    font-size: 1.05rem;
    line-height: 1.78rem;
}

#vcomments blockquote p {
    text-indent: 0.2rem;
}

#vcomments a {
    padding: 0 2px;
    color: #4cbf30;
    font-weight: 500;
    text-decoration: none;
}

#vcomments img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

#vcomments ol li {
    list-style-type: decimal;
}

#vcomments ol,
ul {
    display: block;
    padding-left: 2em;
    word-spacing: 0.05rem;
}

#vcomments ul li,
ol li {
    display: list-item;
    line-height: 1.8rem;
    font-size: 1rem;
}

#vcomments ul li {
    list-style-type: disc;
}

#vcomments ul ul li {
    list-style-type: circle;
}

#vcomments table, th, td {
    padding: 12px 13px;
    border: 1px solid #dfe2e5;
}

#vcomments table, th, td {
    border: 0;
}

table tr:nth-child(2n), thead {
    background-color: #fafafa;
}

#vcomments table th {
    background-color: #f2f2f2;
    min-width: 80px;
}

#vcomments table td {
    min-width: 80px;
}

#vcomments h1 {
    font-size: 1.85rem;
    font-weight: bold;
    line-height: 2.2rem;
}

#vcomments h2 {
    font-size: 1.65rem;
    font-weight: bold;
    line-height: 1.9rem;
}

#vcomments h3 {
    font-size: 1.45rem;
    font-weight: bold;
    line-height: 1.7rem;
}

#vcomments h4 {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.5rem;
}

#vcomments h5 {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.4rem;
}

#vcomments h6 {
    font-size: 1rem;
    line-height: 1.3rem;
}

#vcomments p {
    font-size: 1rem;
    line-height: 1.5rem;
}

#vcomments hr {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid #ccc;
}

#vcomments blockquote {
    margin: 15px 0;
    border-left: 5px solid #42b983;
    padding: 1rem 0.8rem 0.3rem 0.8rem;
    color: #666;
    background-color: rgba(66, 185, 131, .1);
}

#vcomments pre {
    font-family: monospace, monospace;
    padding: 1.2em;
    margin: .5em 0;
    background: #272822;
    overflow: auto;
    border-radius: 0.3em;
    tab-size: 4;
}

#vcomments code {
    font-family: monospace, monospace;
    padding: 1px 3px;
    font-size: 0.92rem;
    color: #e96900;
    background-color: #f8f8f8;
    border-radius: 2px;
}

#vcomments pre code {
    font-family: monospace, monospace;
    padding: 0;
    color: #e8eaf6;
    background-color: #272822;
}

#vcomments pre[class*="language-"] {
    padding: 1.2em;
    margin: .5em 0;
}

#vcomments code[class*="language-"],
pre[class*="language-"] {
    color: #e8eaf6;
}

#vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
    position: inherit;
    margin-left: -1.3rem;
    margin-right: 0.4rem;
    margin-top: -1px;
    vertical-align: middle;
    left: unset;
    visibility: visible;
}

#vcomments b,
strong {
    font-weight: bold;
}

#vcomments dfn {
    font-style: italic;
}

#vcomments small {
    font-size: 85%;
}

#vcomments cite {
    font-style: normal;
}

#vcomments mark {
    background-color: #fcf8e3;
    padding: .2em;
}

#vcomments table, th, td {
    padding: 12px 13px;
    border: 1px solid #dfe2e5;
}

table tr:nth-child(2n), thead {
    background-color: #fafafa;
}

#vcomments table th {
    background-color: #f2f2f2;
    min-width: 80px;
}

#vcomments table td {
    min-width: 80px;
}

#vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
    position: inherit;
    margin-left: -1.3rem;
    margin-right: 0.4rem;
    margin-top: -1px;
    vertical-align: middle;
    left: unset;
    visibility: visible;
}

</style>

<div class="card valine-card" data-aos="fade-up">

<div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; left: 20px; top: 15px; padding-bottom: 5px;">
    <i class="fas fa-comments fa-fw" aria-hidden="true"></i>
    <span>评论</span>
</div>
<div id="vcomments" class="card-content" style="display: grid">
</div>

</div>

<script src="/libs/valine/av-min.js"></script>
<script src="/libs/valine/Valine.min.js"></script>
<script>

new Valine({
    el: '#vcomments',
    appId: 'DPLG4Gi5sBCRsaHxTVvE1I4Q-gzGzoHsz',
    appKey: 'cCUTXRB8BhFEQM35QXBD793j',
    notify: 'false' === 'true',
    verify: 'false' === 'true',
    visitor: 'true' === 'true',
    avatar: 'mm',
    pageSize: '10',
    lang: 'zh-cn',
    placeholder: 'just go go'
});

</script>

<article id="prenext-posts" class="prev-next articles">

<div class="row article-row">
    
    <div class="article col s12 m6" data-aos="fade-up">
        <div class="article-badge left-badge text-color">
            <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
        <div class="card">
            <a href="/2020/01/10/chuan-kou-tong-xin-shi-yan/">
                <div class="card-image">
                    
                    
                    <img src="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/%E6%87%92%E5%8A%A0%E8%BD%BD/%E6%87%92%E5%8A%A0%E8%BD%BD.gif" data-original="/medias/featureimages/6.jpg" class="responsive-img" alt="串口通信实验">
                    
                    <span class="card-title">串口通信实验</span>
                </div>
            </a>
            <div class="card-content article-content">
                <div class="summary block-with-text">
                    
                        串口通信实验学习笔记
                    
                </div>
                <div class="publish-info">
                    <span class="publish-date">
                        <i class="far fa-clock fa-fw icon-date"></i>2020-01-10
                    </span>
                    <span class="publish-author">
                        
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                        <a href="/categories/stm32/" class="post-category">
                                stm32
                            </a>
                        
                        
                    </span>
                </div>
            </div>
            
            <div class="card-action article-tags">
                
                <a href="/tags/STM32/">
                    <span class="chip bg-color">STM32</span>
                </a>
                
            </div>
            
        </div>
    </div>
    
    
    <div class="article col s12 m6" data-aos="fade-up">
        <div class="article-badge right-badge text-color">
            下一篇&nbsp;<i class="fas fa-chevron-right"></i>
        </div>
        <div class="card">
            <a href="/2019/12/07/linux-xue-xi-bi-ji/">
                <div class="card-image">
                    
                    
                    <img src="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/%E6%87%92%E5%8A%A0%E8%BD%BD/%E6%87%92%E5%8A%A0%E8%BD%BD.gif" data-original="/medias/featureimages/10.jpg" class="responsive-img" alt="Linux学习笔记">
                    
                    <span class="card-title">Linux学习笔记</span>
                </div>
            </a>
            <div class="card-content article-content">
                <div class="summary block-with-text">
                    
                        Linux学习笔记一.Linux关机正确的关机流程为:sync &gt; shutdown &gt; reboot &gt; halt

可以运行如下命令关机:
sync //将数据由内存同步到硬盘中。

shutdown //关机指令,你可

                    
                </div>
                <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2019-12-07
                        </span>
                    <span class="publish-author">
                        
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                        <a href="/categories/Linux/" class="post-category">
                                Linux
                            </a>
                        
                        
                    </span>
                </div>
            </div>
            
            <div class="card-action article-tags">
                
                <a href="/tags/Linux/">
                    <span class="chip bg-color">Linux</span>
                </a>
                
            </div>
            
        </div>
    </div>
    
</div>

</article>

</div>

<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>

<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>

<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>

<!-- 代码块折行 -->

<style type="text/css">
code[class="language-"], pre[class="language-"] { white-space: pre !important; }
</style>

</div>
<div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
    <div class="toc-widget">
        <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
        <div id="toc-content"></div>
    </div>
</div>

</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">

<a class="btn-floating btn-large bg-color">
    <i class="fas fa-list-ul"></i>
</a>

</div>

<script src="/libs/tocbot/tocbot.min.js"></script>
<script>

$(function () {
    tocbot.init({
        tocSelector: '#toc-content',
        contentSelector: '#articleContent',
        headingsOffset: -($(window).height() * 0.4 - 45),
        collapseDepth: Number('0'),
        headingSelector: 'h2, h3, h4'
    });

    // modify the toc link href to support Chinese.
    let i = 0;
    let tocHeading = 'toc-heading-';
    $('#toc-content a').each(function () {
        $(this).attr('href', '#' + tocHeading + (++i));
    });

    // modify the heading title id to support Chinese.
    i = 0;
    $('#articleContent').children('h2, h3, h4').each(function () {
        $(this).attr('id', tocHeading + (++i));
    });

    // Set scroll toc fixed.
    let tocHeight = parseInt($(window).height() * 0.4 - 64);
    let $tocWidget = $('.toc-widget');
    $(window).scroll(function () {
        let scroll = $(window).scrollTop();
        /* add post toc fixed. */
        if (scroll > tocHeight) {
            $tocWidget.addClass('toc-fixed');
        } else {
            $tocWidget.removeClass('toc-fixed');
        }
    });

    
    /* 修复文章卡片 div 的宽度. */
    let fixPostCardWidth = function (srcId, targetId) {
        let srcDiv = $('#' + srcId);
        if (srcDiv.length === 0) {
            return;
        }

        let w = srcDiv.width();
        if (w >= 450) {
            w = w + 21;
        } else if (w >= 350 && w < 450) {
            w = w + 18;
        } else if (w >= 300 && w < 350) {
            w = w + 16;
        } else {
            w = w + 14;
        }
        $('#' + targetId).width(w);
    };

    // 切换TOC目录展开收缩的相关操作.
    const expandedClass = 'expanded';
    let $tocAside = $('#toc-aside');
    let $mainContent = $('#main-content');
    $('#floating-toc-btn .btn-floating').click(function () {
        if ($tocAside.hasClass(expandedClass)) {
            $tocAside.removeClass(expandedClass).hide();
            $mainContent.removeClass('l9');
        } else {
            $tocAside.addClass(expandedClass).show();
            $mainContent.addClass('l9');
        }
        fixPostCardWidth('artDetail', 'prenext-posts');
    });
    
});

</script>

</main>

<footer class="page-footer bg-color">
<div class="container row center-align">
    <div class="col s12 m8 l8 copy-right">
        Copyright&nbsp;&copy;
        <span id="year">年份</span>
        <a href="http://stepsix.cn" target="_blank">步六孤</a>
        |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
        |&nbsp;Theme&nbsp;<a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
        <br>
        
        &nbsp;<i class="fas fa-chart-area"></i>&nbsp;站点总字数:&nbsp;<span
            class="white-color">53.9k</span>&nbsp;字
        
        
        
        
        
        
        <span id="busuanzi_container_site_pv">
            |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span id="busuanzi_value_site_pv"
                class="white-color"></span>&nbsp;次
        </span>
        
        
        <span id="busuanzi_container_site_uv">
            |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span id="busuanzi_value_site_uv"
                class="white-color"></span>&nbsp;人
        </span>
        
        <br>
        
        <span id="sitetime">载入运行时间...</span>
        <script>
            function siteTime() {
                window.setTimeout("siteTime()", 1000);
                var seconds = 1000;
                var minutes = seconds * 60;
                var hours = minutes * 60;
                var days = hours * 24;
                var years = days * 365;
                var today = new Date();
                var startYear = "2019";
                var startMonth = "10";
                var startDate = "29";
                var startHour = "0";
                var startMinute = "0";
                var startSecond = "0";
                var todayYear = today.getFullYear();
                var todayMonth = today.getMonth() + 1;
                var todayDate = today.getDate();
                var todayHour = today.getHours();
                var todayMinute = today.getMinutes();
                var todaySecond = today.getSeconds();
                var t1 = Date.UTC(startYear, startMonth, startDate, startHour, startMinute, startSecond);
                var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
                var diff = t2 - t1;
                var diffYears = Math.floor(diff / years);
                var diffDays = Math.floor((diff / days) - diffYears * 365);
                var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours);
                var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
                    minutes);
                var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours -
                    diffMinutes * minutes) / seconds);
                if (startYear == todayYear) {
                    document.getElementById("year").innerHTML = todayYear;
                    document.getElementById("sitetime").innerHTML = "本站已挣扎运行 " + diffDays + " 天 " + diffHours +
                        " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                } else {
                    document.getElementById("year").innerHTML = startYear + " - " + todayYear;
                    document.getElementById("sitetime").innerHTML = "本站已挣扎运行 " + diffYears + " 年 " + diffDays +
                        " 天 " + diffHours + " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                }
            }
            setInterval(siteTime, 1000);
        </script>
        
        <br>
        
        <span id="icp"><img src="https://blogimg-1300505643.cos.ap-shanghai.myqcloud.com/picture/%E6%87%92%E5%8A%A0%E8%BD%BD/%E6%87%92%E5%8A%A0%E8%BD%BD.gif" data-original="/medias/icp.png" style="vertical-align: text-bottom;" />
            <a href="http://www.beian.miit.gov.cn" target="_blank">渝ICP备20000663号</a>
        </span>
        
    </div>
    <div class="col s12 m4 l4 social-link social-statis">
<a href="https://github.com/buliugu-tech" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
    <i class="fab fa-github"></i>
</a>
<a href="mailto:2578881744@qq.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
    <i class="fas fa-envelope-open"></i>
</a>
<a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=2578881744" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 2578881744" data-position="top" data-delay="50">
    <i class="fab fa-qq"></i>
</a>
<a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
    <i class="fas fa-rss"></i>
</a>

</div>

</div>

</footer>

<div class="progress-bar"></div>

<!-- 搜索遮罩框 -->

<div id="searchModal" class="modal">

<div class="modal-content">
    <div class="search-header">
        <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
        <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
               class="search-input">
    </div>
    <div id="searchResult"></div>
</div>

</div>

<script src="/js/search.js"></script>
<script type="text/javascript">
$(function () {

searchFunc("/" + "search.xml", 'searchInput', 'searchResult');

});
</script>

<!-- 回到顶部按钮 -->

<div id="backTop" class="top-scroll">

<a class="btn-floating btn-large waves-effect waves-light" href="#!">
    <i class="fas fa-arrow-up"></i>
</a>

</div>

<script src="/libs/materialize/materialize.min.js"></script>
<script src="/libs/masonry/masonry.pkgd.min.js"></script>
<script src="/libs/aos/aos.js"></script>
<script src="/libs/scrollprogress/scrollProgress.min.js"></script>
<script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
<script src="/js/matery.js"></script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- Baidu Analytics -->

<!-- Baidu Push -->

<script>

(function () {
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    } else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();

</script>


<script src="/libs/others/clicklove.js" async="async"></script>


<script async src="/libs/others/busuanzi.pure.mini.js"></script>







<script type="text/javascript" color="0,0,255"
    pointColor="0,0,255" opacity='0.7'
    zIndex="-1" count="99"
    src="/libs/background/canvas-nest.js"></script>



<script type="text/javascript" size="150" alpha='0.6'
    zIndex="-1" src="/libs/background/ribbon.min.js" async="async"></script>



<script type="text/javascript" src="/libs/background/ribbon-dynamic.js" async="async"></script>



<script src="/libs/instantpage/instantpage.js" type="module"></script>

<script>!function(e){var c=Array.prototype.slice.call(document.querySelectorAll("img[data-original]"));function i(){for(var r=0;r<c.length;r++)t=c[r],0<=(n=t.getBoundingClientRect()).top&&0<=n.left&&n.top<=(e.innerHeight||document.documentElement.clientHeight)&&function(){var t,n,e,i,o=c[r];t=o,n=function(){c=c.filter(function(t){return o!==t})},e=new Image,i=t.getAttribute("data-original"),e.onload=function(){t.src=i,n&&n()},e.src=i}();var t,n}i(),e.addEventListener("scroll",function(){var t,n;t=i,n=e,clearTimeout(t.tId),t.tId=setTimeout(function(){t.call(n)},500)})}(this);</script></body>

</html>

最后修改:2020 年 11 月 30 日 11 : 12 PM
如果觉得我的文章对你有用,请随意赞赏