Hi Debasish,

I am using gcc in ubuntu. once I remove n in the arr[ n ]
int arr[ ] = { 1, 2, 3, 4, 5 } 
it complies without warning.
Or 
int arr[ 6 ] = { 1, 2, 3, 4, 5 }, 
this complies as well.

So I think there should be a null at the end of array.

Regards,
Wang Jun

On Fri, 2007-11-02 at 17:29 +0000, debasish deka wrote:
> Hello all,
> Recently I read in some topic about C99 - modifications to ANSI C.
> That it had facility for runtime varying array compatibility. So I
> tried this short program on DevC++. But it was full with warnings
> int main(int argc, char *argv[])
> {
> int n = 5;
> int arr[n] = {1,2,3,4,5};
> while(n--)
> printf("\nelement is %d\n",arr[n]);
> system("PAUSE"); 
> return 0;
> }
> Would anyone direct me into this matter
> And yes, I am using the latest down loaded version of devC++ with all
> optimizations enabled.
> Regards
> Debasish
> 
> Karmennevaya Dhikaraste, Maaphaaleshu Kadaachanah
> 
> ---------------------------------
> Save all your chat conversations. Find them online.
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
>  

Reply via email to