#include<iostream>
using namespace std;
int main()
{
//1.字符型变量创建的方式
char ch = 'a';
cout << ch << endl;
//2.字符型变量所占内存的大小
cout << "char所占内存的大小:" << sizeof(char) << endl;
//3.字符型变量常见错误
//char ch1 = "a";//创建字符型变量时候,要用单引号
//char ch1 = 'abc';//创建字符型变量时候,单引号内只能有一个字符
//4.字符型变量对于ASCII a=97 A=65
cout <<(int)ch << endl;
system("pause");
return 0;
}