Re: Query: Declaring arrays as extern

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Viresh,

I think this is what's happening in your case.

Imagine array address is 0x1000 and the contents stored are 1,2,3,4...10.
So when you access  it as a pointer int *array,address of array will
get 0x1000 and array variable will have the
value 1.So when you print it the value will be 1 and when you
dereference it,it will try to fetch from 0x1.

On Thu, Dec 22, 2011 at 3:04 AM, viresh kumar <viresh.linux@xxxxxxxxx> wrote:
> On Thu, Dec 22, 2011 at 2:34 PM, viresh kumar <viresh.linux@xxxxxxxxx> wrote:
>> Hi,
>>
>> I can observing an behavior which i am not able to explain.
>
>   I am
>
> sorry. :)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
With Regards
Subin Gangadharan

I am not afraid and I am also not afraid of being afraid.
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux