+ 2
Please explain this
I have read this statement in c++ book , if it is correct then why my code is running ! The identifiers we define in our own programs may not contain two consecutive underscores, nor can an identifier begin with an underscore followed immediately by an uppercase letter. In addition, identifiers defined outside a function may not begin with an underscore. https://code.sololearn.com/cw2w1ZcfWRoC/?ref=app
3 Answers
+ 3
This is because these types of identifiers are reserved for implementation to use.
In this case, you are lucky to not get any problem when using these, but results might differ from compiler to compiler, that's why it is recommended to not use such identifier names in your program as they might conflict with the ones used by your implementation.
0
Identifiers can begin only with _ or alphabet, can be either uppercase or lowercase letters . It can contain numbers as part of identifier. We prefer lowercase letter to identifiers is to easily diffrentiate it between identifiers, Class, Macro.
- 1
Vetrivel Subramani
We know this , I'm saying that above sentence is correct or it depends on compiler-to-compiler , OS etc. or it is wrong !