C - VARIABLES
VARIABLES:-
A
variable is a data name that may be used to stores a data value.
Declaration
:
Syntax - <<Data
type>> <<variable name>>;
Ex. - int
a;
Definition
:
Syntax - <<varname>>=<<value>>;
Ex. - a=10;
Rules for
naming variables:
·
Should not be a reserved word like int etc.
·
Should start with a letter or an underscore (_)
·
Can contain letters, numbers or underscore.
·
No other special characters are allowed including
space
·
Variable names are case sensitive, A and a are
different.
Comments
Post a Comment