valid of invalid

state wheather the following identifiers are valid or invalid.

1. max-marks
2. area of square
3. 1num
4. cust_name
5. totalsum

please help me
Below are some rules of naming identifiers in c++:

*An identifier can only contain letters (a-z, A-Z), numbers, and the underscore character(_). i.e apart from the underscore symbol(_), no other symbol is allowed.

*An identifier can not start with a number

*you can not use key words as an identifier.

i guess from the rules stated above, you should be able to know what valid identifies are .
Last edited on
closed account (SECMoG1T)
+
spaces aren't part of the game either, always use meaningful identifiers...
dude thank you so much. I've got the answers for the question.
Topic archived. No new replies allowed.