• sizeof关键字

数据类型-sizeof关键字-实型(浮点型)-转义字符_有效数字

  • 实型

数据类型-sizeof关键字-实型(浮点型)-转义字符_转义字符_02

  1. 有效数字包括小数点以前的数字
  2. float num1 = 3.14 f ;
  3. 默认情况下输出一个小数,小数点后最多显示6位有效数字
  • 转义字符

数据类型-sizeof关键字-实型(浮点型)-转义字符_转义字符_03

点击查看代码
#include<iostream>
#include<string>

using namespace std;

//转义字符

int main()
{
	//换行符 \n
	cout << "hello \nworld" << endl;

	//反斜杠 \\ 
	cout << "\\" << endl;

	//水平制表符 \t  作用:可以 整齐输出数据
	cout << "aaa\thelloworld" << endl; 
	cout << "aaaa\thelloworld" << endl;
	cout << "aaaaaa\thelloworld" << endl;

	system("pause");

	return 0;
}