C++Primer Fifth Edition: Exercise 2.12

#include<iostream>

int main()
{
    
    
	int double = 3.14;
	int _;
	int catch - 22;
	int 1_or_2 = 1;
	double Double = 3.14;
}

(a) Double is a keyword and cannot be used as an identifier
(b) It is legal, and the identifier consists of alphanumeric and underscore, which must start with a letter or underscore
(c) cannot have a hyphen
(d) cannot start with a number
( e) legal

Guess you like

Origin blog.csdn.net/Xgggcalled/article/details/108834732