2_5.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:

C#编程

开发平台:

Visual C++

  1. #include <iostream.h>
  2. void main()
  3. {
  4.   cout <<"size of char           " <<sizeof(char) <<" byten"
  5.        <<"size of unsigned char  " <<sizeof(unsigned char) <<" byten"
  6.        <<"size of signed char    " <<sizeof(signed char) <<" byten"
  7.        <<"size of int            " <<sizeof(int) <<" byten"
  8.        <<"size of unsigned       " <<sizeof(unsigned) <<" byten"
  9.        <<"size of signed         " <<sizeof(signed) <<" byten"
  10.        <<"size of short          " <<sizeof(short) <<" byten"
  11.        <<"size of unsigned short " <<sizeof(unsigned short) <<" byten"
  12.        <<"size of long           " <<sizeof(long) <<" byten"
  13.        <<"size of signed long    " <<sizeof(signed long) <<" byten"
  14.        <<"size of unsigned long  " <<sizeof(unsigned long) <<" byten"
  15.        <<"size of float          " <<sizeof(float) <<" byten"
  16.        <<"size of double         " <<sizeof(double) <<" byten"
  17.        <<"size of long double    " <<sizeof(long double) <<" byten";
  18. }