hi asadullah.ansari..
Quote:
Rules of Array: If First element is initilized to any value then all next to this element will have zero value.
there is no such rule...i have written a small code ..
Code:
int main( void )
{
int var[12];
var[2] = 0;
printf("%d%d",var[2], var[3] );
return 0;
}
this code compiles with a warning in Visual Studio and crashed when run..
and this code compiles with no warning using cc in Red Hat and gives garbage value for x[3] and not 0..
the rule/standard is that if an array has been declared/defined as a static array then all its variable are initialized to zero..
and about
i am sure it is a sequence point ..as explained clearly in the link given by me in the earlier post .
i believe that even you were talking about the case when variable are declared/defined as static.