Hi,
Earlier I studied that variable name should follow the below rulse
"Rules for Constructing Variable Names
(A) A variable name is any combination of 1 to 31 alphabets,
digits or underscores. Some compilers allow variable names
whose length could be up to 247 characters. Still, it would be
safer to stick to the rule of 31 characters. Do not create
unnecessarily long variable names as it adds to your typing
effort.
(B) The first character in the variable name must be an alphabet or
underscore.
(C) No commas or blanks are allowed within a variable name.
(D) No special symbol other than an underscore (as in gross_sal)
can be used in a variable name.
Ex.: si_int
m_hra
pop_e_89"
But
my doubt is i am able to compile the below program with the integer variable name as '$'
Code:#include<stdio.h> int main() { int $; int j; $=10; printf ("%d\n",$); return 0; }
can any one help me to know about this? is is correct variable declaration?