首页 > 编程语言 > 详细

c语言 7-1

时间:2021-05-16 23:57:37      阅读:27      评论:0      收藏:0      [点我收藏+]

1、

#include <stdio.h>

int main(void)
{
    int n;
    printf("sizeof(1)            = %u\n", (unsigned)sizeof(1));
    printf("sizeof(+1)           = %u\n", (unsigned)sizeof(+1));
    printf("sizeof(-1)           = %u\n", (unsigned)sizeof(-1));
    
    printf("sizeof(unsigned) - 1 = %u\n", (unsigned)sizeof(unsigned) - 1);
    printf("sizeof(double) - 1   = %u\n", (unsigned)sizeof(double) - 1);
    printf("sizeof((double) - 1) = %u\n", (unsigned)sizeof((double) - 1));
    
    printf("sizeof(n + 2)        = %u\n", (unsigned)sizeof(n + 2));
    printf("sizeof(n) + 2        = %u\n", (unsigned)sizeof(n) + 2);
    printf("sizeof(n + 2.0)      = %u\n", (unsigned)sizeof(n + 2.0));
    return 0;
}

技术分享图片

 

c语言 7-1

原文:https://www.cnblogs.com/liujiaxin2018/p/14774871.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!