In C++, there is an implicit type conversion syntax (automatic type conversion)
int a=11;
a=1.23+a;
In C++, there is an explicit type conversion syntax
格式: 类型名(变量名);
例:
int a=int(99.2);
In C, there is an explicit type conversion syntax
格式:(类型名)变量名;
例:
int num=(int)12.3;