7.10 数据类型&进制转化 Day4

---note---

_ _ _ _ _ _ _ _

最高位为符号位

8位为0-7

基本数据类型:

整型:int 

  short int 

  long int

字符型:char ( 'a' 'b' 'c' '1' '2' )

字符串:'ab' '123' 

浮点型:float 

    double 

常量:定义一次,不可改变   #define NAME Dy  #define π 3.14

变量:定义一次,可改变多次     int a=1

---note---

十六进制a=10,b=11  0xab=171

 

#include <iostream.h>

void main ()

{

   char a='B';

   cout<<"a="<<a;

}

 

    

posted on 2016-07-11 11:47  Dengyi  阅读(110)  评论(0)    收藏  举报

导航