基础语法与数据类型

数据类型

暂不考虑 枚举enum,结构struct,类class

c/cpp

布尔型 bool 1Byte
字符型 char 1Bytes
整型 int 4Bytes
浮点型 float 4Bytes
双浮点型 double 8Bytes
无类型 void
一些基本类型可以使用一个或多个类型修饰符进行修饰:
signed unsigned short long
如宽字符型 wchar_t 是 typedef short int wchar_t;

java

Java语言提供了八种基本类型。六种数字类型(四个整数型,两个浮点型),一种字符类型,还有一种布尔型。
byte 1Byte
short 2Bytes
int 4Bytes
long 8Bytes
float 4Bytes
double 8Bytes
boolean 1bit
char 2Bytes 16位Unicode字符

python

Python3 中有六个标准的数据类型:
Number(数字) 为 int、float、bool、complex(复数)
String(字符串)
List(列表)
Tuple(元组)
Set(集合)
Dictionary(字典)
Python3 的六个标准数据类型中:
不可变数据(3 个):Number(数字)、String(字符串)、Tuple(元组);
可变数据(3 个):List(列表)、Dictionary(字典)、Set(集合)。

基础语法

todo