hi
according to ansi c standards all declarations have to to be at the
starting of the block..
which means the program below should not work.. i compiled this using gcc
>>gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)
>>Copyright (C) 2004 Free Software Foundation, Inc.
>>This is free software; see the source for copying conditions. There is NO
>>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
but it is working fine..
this might be fine with g++ but i used gcc...
int main()
{
int i;
scanf("%d",&i);
int a[i];
a[i-1]=128;
printf("%d",a[i-1]);
}
is this a bug or just for compatability with c++...
please clarify
expecting a reply...
--
Sankara Rameswaran,
Give more your ears less your voice