Nobody wrote: > On Wed, 30 Jun 2010 23:40:06 -0600, Michael Torrie wrote: >> Given "char buf[512]", buf's type is char * according to the compiler >> and every C textbook I know of.
References from Kernighan & Ritchie _The C Programming Language_ second edition: > No, the type of "buf" is "char [512]", i.e. "array of 512 chars". If you > use "buf" as an rvalue (rather than an lvalue), it will be implicitly > converted to char*. K&R2 A7.1 > If you take its address, you'll get a "pointer to array of 512 chars", > i.e. a pointer to the array rather than to the first element. Converting > this to a char* will yield a pointer to the first element. K&R2 A7.4.2 Mel. -- http://mail.python.org/mailman/listinfo/python-list