7. 例子

作者: bigwhite | 来源:发表于2013-11-26 14:47 被阅读0次
   /*
     * Determine if the sky is blue by checking that it isn't night.
     * CAVEAT: Only sometimes right.  May return TRUE when the answer
     * is FALSE.  Consider clouds, eclipses, short days.
     * NOTE: Uses 'hour' from 'hightime.c'.  Returns 'int' for
     * compatibility with the old version.
     */
    int                             /* true or false */
    skyblue()
    {
            extern int      hour;           /* current hour of the day */
    
            return (hour >= MORNING && hour <= EVENING);
    }

    /*
     * Find the last element in the linked list
     * pointed to by nodep and return a pointer to it.
     * Return NULL if there is no last element.
     */
    node_t *
    tail(nodep)
            node_t  *nodep;                 /* pointer to head of list */
    {
            register node_t *np;            /* advances to NULL */
            register node_t *lp;            /* follows one behind np */
    
            if (nodep == NULL)
                    return (NULL);
            for (np = lp = nodep; np != NULL; lp = np, np = np->next)
                    ;       /* VOID */
            return (lp);
    }

相关文章

  • 7. 例子

  • C++学习笔记:(五)继承&&多态

    本文章分为知识点、例子和心得,交流群728483370,一起学习加油! 7.组合、继承与多态性 7.1 组合 7....

  • 我才不嫁这样的你(4)

    7.嗜赌如命男 我们村就有这样的例子。 老郑的老婆是村里的医生,二十年前还是县人大代表。自己在村子里开了个废品收购...

  • 2019-09-28

    7.

  • Leetcode PHP题解--D132 7. Reverse

    D132 7. Reverse Integer 题目链接 7. Reverse Integer[https://l...

  • 发!7.

  • 例子

    # 开学了 - 一天 -二天 - 三天

  • 例子

    例子1 例子2 例子3 例子4 例子5 例子6 超链接 黑体 下面是代码块 下面是引用 引用

  • 例子

    莫言在《母亲》一文里写到了两处他在小时候不能理解,但影响深远的事情。第一处是: 愁容满面的母亲,在辛苦地劳作时,嘴...

  • 例子

    要求1,三个inputview同时有值的时候按钮可点击. 要求2,网络请求完成之后,才能再次点击. 传统实现,在t...

网友评论

      本文标题:7. 例子

      本文链接:https://www.haomeiwen.com/subject/gniqtttx.html