• sizeof()的用法


    机器平台:X86_64 处理器

    操作系统:Red Hat 4.1.2-14

    编译器: gcc version 4.1.2 20070626

     

     

    Size of char is:                                   1

    Size of unsigned char is:                     1

    Size of signed char is:                  1

     

     

    Size of int is:                                    4

    Size of short is:                                2

    Size of long is:                                  8

    Size of long int is:                             8

    Size of signed int is:                           4

    Size of unsigned int is:                       4

    Size of unsigned long int is:                8

    Size of long long int is:                       8

    Size of unsigned long long is:              8

     

     

     

    Size of float is:                    4

     

    Size of double is:                 8

     

    Size of long double is:          16

     

     

     

    Size of (void *) is:           8

    Size of (char *) is:           8

    Size of (int *) is:             8

    Size of (long *) is:           8

    Size of (long long *) is:   8

    Size of (float *) is:          8

    Size of (double *) is:              8

     所有指针都是占8字节

     

    ——————————————————————————

     

     

     

    机器平台: X86_32 处理器

    操作系统:  Windows XP SP2

    编译器:    VS2005自带的C++编译器

     

     

    Size of char is:                            1

    Size of unsigned char is:              1

    Size of signed char is:           1

     

     

     

    Size of int is:                       4

    Size of short is:                    2

    Size of long is:                     4

    Size of long int is:                4

    Size of signed int is:             4

    Size of unsigned int is:          4

    Size of unsigned long int is:         4

    Size of long long int is:                8

    Size of unsigned long long is:       8

     

     

     

    Size of float is:                    4

    Size of double is:                 8

    Size of long double is:          8

     

     

     

    Size of (void *) is:          4    

    Size of (char *) is:          4

    Size of (int *) is:             4

    Size of (long *) is:          4

    Size of (long long *) is:   4

    Size of (float *) is:          4

    Size of (double *) is:       4

    所有指针都是占4字节

  • 相关阅读:
    JS,JQ及时监听input值的变化,MUI的input搜索框里的清除按钮的点击监听事件
    MUI 底部弹出的选择框
    MUI 拍照或选取照片上传作为头像
    多行文本文本输入框 textarea 可点击任意地方编辑的问题
    mui dtpicker 时间的设置 以及MUI的弹窗
    MUI 样式按钮的禁用
    利用渐变实现书本的效果
    调用sqlserver中的存储过程
    XmlHelper
    面试题 数据库sql
  • 原文地址:https://www.cnblogs.com/daxiong225/p/4813133.html
Copyright © 2020-2023  润新知