zoukankan      html  css  js  c++  java
  • 各类型的sizeof()值

    参考一:

    sizeof (char unsinged char   singed char ) =1     字符类型规定为1

    sizeof ()

    [signed] int                    2     16bit

    unsinged int                    2

    [signed]short [int]             2

    unsigned short [int]            2

    [singed] long [int]             4     32bit

    unsigned long [int]             4

    float                           4     

    double                          8    64bit

    long double                     16   128bit

    sizeof(数组) = 数组长度

    sizeof(指针) = 2

    sizeof(结构体struct) = 所有结构字节数总和

    sizeof(联合体union) = 最大成员字节数

    参考二:

    数据类型 说明 字节数 取值范围
    bool 布尔型 1 true,false
    char 字符型 1 -128~127
    unsigned char 无符号字符型 1 0~255
    short 短整型 2 -32768~32767
    unsigned short 无符号短整型 2 0~65535
    int 整型 4 -2147483648~2147483647
    unsigned 无符号整型 4 0~4294967295
    long 长整型 4 -2147483648~2147483647
    unsigned long 无符号长整型 4 0~4294967295
    float 单精度型 4 -3.4×10-38~3.4×10-38
    double 双精度型 8 -1.7×10-308~1.7×10-308
    long double 长双精度型 8 -1.7×10-308~1.7×10-308
  • 相关阅读:
    ActiveMQ的用途
    HTTP 状态码的完整列表
    Linux中脚本运行错误(坏的解释器:没有那个文件或目录)
    Linux下ping: unknown host www.baidu.com的解决办法
    python中的collection
    Table里嵌套ASPXGridView
    致2015
    WPF学习之Binding(二)
    WPF学习之Binding(一)
    WPF UI布局(Layout)
  • 原文地址:https://www.cnblogs.com/snailrun/p/2644865.html
Copyright © 2011-2022 走看看