Int a; Error
Int a b c; Error
Int a, b, c;
Int a b c, d;
Int if; Error
Int If; yes valid because C case sensitive and all keywords in same case.
Int – if; yes valid
Int 1, 2, 3; Error Constant does not allowed
Int ─1, ─2,─3; valid
Int 1a, 1b, 1c; Error
Int a1, b1, c1; Yes
Int total –sal ; Error
Int total-sal; yes
Int print F; valid
All keywords are reserved words but all reserved words are not keywords.
Like print f is keyword not defined in java, c#, etc.
As per the variable declarations for naming conversion we required to follow 2 rules-
According to this notation first characters of every word should be required in upper case & every subsequent word also is required to follow the same condition. E.g. Int Total salary;
Acc. to this notation every variable should require a prefix which indicates what type of data type is the variable.
The basic difference b/w declaration and initialization of a variable is in declaration of the variable after creating the memory. It stores garbage value until we are assigning the data. In initialization of the variable after creating the m/m by default it stores what value is assigned.