Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which of the following is a correct identifier in C++?

a) 7var_name
b) $var_name
c) VAR_1234
d) 7VARNAME

Answer: c
Explanation: The rules for writing an identifier is :
1) may contain lowercase/uppercase letters, digits or underscore(_) only
2) should start with a non-digit character
3) should not contain any special characters like @, $, etc

Join The Discussion