Chinaunix首页 | 论坛 | 博客
  • 博客访问: 99223
  • 博文数量: 102
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1011
  • 用 户 组: 普通用户
  • 注册时间: 2014-01-15 13:58
个人简介

普普通通一个人

文章分类

全部博文(102)

文章存档

2018年(1)

2015年(13)

2014年(88)

我的朋友

分类: C/C++

2014-02-20 14:36:36


点击(此处)折叠或打开

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>

  4. int main(){
  5.     int i;
  6.     float j;
  7.     double k;
  8.     unsigned l;
  9.     long m;
  10.     short n;
  11.     long double o;
  12.     char p;

  13.     int a, b, c, d, e, f, g, h;

  14.     a = sizeof(i);
  15.     b = sizeof(j);
  16.     c = sizeof(k);
  17.     d = sizeof(l);
  18.     e = sizeof(m);
  19.     f = sizeof(n);
  20.     g = sizeof(o);
  21.     h = sizeof(p);

  22.     printf("int: %d\n", a);
  23.     printf("float: %d\n", b);
  24.     printf("double: %d\n", c);
  25.     printf("unsigned: %d\n", d);
  26.     printf("long: %d\n", e);
  27.     printf("short: %d\n", f);
  28.     printf("long double: %d\n", g);
  29.     printf("char: %d\n", h);
  30. }

阅读(172) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~