Since array references decay into pointers, if arr is an array, what's the difference?
|
|
|
|
|
In Standard C, &arr yields a pointer, of type pointer-to-array-
of-T, to the entire array. (In pre-ANSI C, the & in &arr
generally elicited a warning, and was generally ignored.) Under
all C compilers, a simple reference (without an explicit &) to
an array yields a pointer, of type pointer-to-T, to the array's
first element.
Related items
Only registered users can write comments. Please login or register.
|