Page 144 - C-Language
P. 144
Introduction
Example of declarations are:
int a; /* declaring single identifier of type int */
The above declaration declares single identifier named a which refers to some object with int type.
int a1, b1; /* declaring 2 identifiers of type int */
The second declaration declares 2 identifiers named a1 and b1 which refers to some other objects
though with the same int type.
Basically, the way this works is like this - first you put some type, then you write a single or
multiple expressions separated via comma (,) (which will not be evaluated at this point - and
which should otherwise be referred to as declarators in this context). In writing such
expressions, you are allowed to apply only the indirection (*), function call (( )) or subscript (or
array indexing - [ ]) operators onto some identifier (you can also not use any operators at all). The
identifier used is not required to be visible in the current scope. Some examples:
/* 1 */ int /* 2 */ (*z) /* 3 */ , /* 4 */ *x , /* 5 */ **c /* 6 */ ;
# Description
1 The name of integer type.
2 Un-evaluated expression applying indirection to some identifier z.
3 We have a comma indicating that one more expression will follow in the same declaration.
4 Un-evaluated expression applying indirection to some other identifier x.
5 Un-evaluated expression applying indirection to the value of the expression (*c).
6 End of declaration.
Note that none of the above identifiers were visible prior to this declaration and so the expressions
used would not be valid before it.
After each such expression, the identifier used in it is introduced into the current scope. (If the
identifier has assigned linkage to it, it may also be re-declared with the same type of linkage so
that both identifiers refer to the same object or function)
Additionally, the equal operator sign (=) may be used for initialization. If an unevaluated expression
(declarator) is followed by = inside the declaration - we say that the identifier being introduced is
also being initialized. After the = sign we can put once again some expression, but this time it'll be
evaluated and its value will be used as initial for the object declared.
https://riptutorial.com/ 120

