linuxers-bounces@mm.ilug-bom.org.in wrote on 09/16/2004 10:41:01 AM:
On Wed, Sep 15, 2004 at 05:33:20PM -0400, Srinivasan Krishnan wrote:
Though apparently C99 makes the differences between pointers and arrays more explicit.
K & R zindabad!
Errr ... why's that?
Sameer.
pointers and arrays are different in the sense that an array cannot be asigned a new value. Look at the following piece of code for explanation:
int a[20]; int* b; int c=10; main() { b = &c; /*it's valid*/ a = &c; /*it's invalid, as a is constant and cannot be asigned a new value*/ }
I hope that helps.
Cheers, -Manu --------- Manu Garg http://manugarg.freezope.org