Regarding the statement;
Every object declaration in C and C++ has two principal parts: a sequence of zero or more declaration specifiers, and a sequence of one or more declarators, separated by commas. For example:
Does zero specifier means declaring a variable named a
as
a;
and not
int a;
? I tried this with an example
#include <stdio.h>
int main(){
x = 9;
printf("%d\n", x);
return 0;
}
and this is giving an error:
[Error] 'x' undeclared (first use in this function)
It was possible in c89 with the implicit int
rule but you needed at least a qualifer or a storage class specifier.
auto x = 3; /* allowed in c89, not valid in c99 */
static y = 4; /* allowed in c89, not valid in c99 */
const z = 5; /* allowed in c89 , not valid in c99*/
a; /* not valid in c89, c99 without a prior declaration */
b = 6; /* not valid in c89, c99 without a prior declaration */