[algogeeks] Re: doubt boss...

2006-05-26 Thread Mayur
When you declare an array int a[3] or whatever, it only says you asked for 3 locations (of type int) to belong to your program. In other words, you asked for 3 locations saying that "a" is an array variable which can be used to access 3 locations legitimately. However, here's what happens interna

[algogeeks] Re: doubt boss...

2006-05-26 Thread akshay ranjan
no compile time checking for the array bounds is provided . On 5/26/06, Sriram narasimhan <[EMAIL PROTECTED]> wrote: hi guys,     i wrote a program for arrays and i declared only a[3]. but my array accepts a[5]=10; statements and other statements...how is that possible..arrays are consid

[algogeeks] Re: doubt boss...

2006-05-26 Thread Haider
it accepts. as array is address of the first element i.e. in your case address of a[0] and there is no upper bound check atleast in C. so you can access and assign memory location which is not reserved in your decleration but don't follow this practice as you may write or corrupt memory used by ot