zoukankan      html  css  js  c++  java
  • 第十六章 标准函数库

    1.整数函数:函数分为三类:算术,随机数和字符串转换。返回值为整型值。

    2.

    int rand(void);
    void srand(unsingned int seed);

    两个函数一起会产生伪随机数。(rand返回一个范围在0和RAND_MAX(至少是32767)之间的随机数)

    srand((unsigned int)time(0));

    http://blog.csdn.net/edonlii/article/details/8464944

    https://zhidao.baidu.com/question/50780610.html?qbl=relate_question_1

    3.字符串转换:

    http://www.cnblogs.com/sddai/p/5774121.html

    4.

    三角函数:math.h

    double sin(double angle)      cos    tan     asin     acos     atan     atan2

    双曲线函数:math.h

    sinh    cosh    tanh

    对数和指数函数:math.h

    exp(返回e^x)    log(以e为底(lnx))     log10(以10为底)

    浮点表示形式:math.h

    frexp(计算指数和小数,把一个浮点数分解为尾数和指数)    

    ldexp(计算value乘以2的exp次幂 ( value * ( 2^exp ) ))    

    modf(把浮点值分成整数和小数部分)

    幂:math.h

    pow      sqrt

    底数,顶数,绝对值和余数:math.h

    floor    ceil     fabs    fmod

    5.日期和时间函数:

    处理器时间:clock_t clock(void);

    当天时间:time_t time(time_t *returned_value);

    日期和时间的转换:ctime函数    asctime函数    gmtime函数   localtime函数    strftime函数(看格式代码)   mktime函数

    6.非本地跳转:setjmp.h

    (类似goto)

    setjmp函数    longjmp函数   

    7.信号:

    信号名:signal.h

    处理信号:signal.h

    raise函数    signal    

    8.打印可变参数列表:stdarg.h 和 stdio.h

    vprintf     vfprintf      vsprintf

    9.

    终止执行:stdlib.h

    abort    atexit      exit

    断言:assert.h

    assert     

    环境:stdlib.h

    *getenv

    执行系统命令:stdlib.h

    system      

    排序和查找:stdlib.h

    qsort

    最后两章讲数据结构方面的东西,我有些看不懂,所以也就选读了,所以,总结笔记大概就到这里了。

  • 相关阅读:
    pug模板引擎(原jade)之 分支条件
    pug模板引擎(原jade)之 属性
    hosts的作用
    typeScript 之 (7) 构造函数和this
    typeScript 之 (8) 继承,重写,super
    typeScript 之(6) 类的简介
    MySQL:一条更新语句是如何执行的
    Centos7 使用 Kubeadm 搭建 k8s 集群
    HTTP Keep-Alive模式客户端与服务器如何判定传输完成
    MySQL:一条SQL是如何执行的
  • 原文地址:https://www.cnblogs.com/Mayfly-nymph/p/8439747.html
Copyright © 2011-2022 走看看