On Mon, 31 Oct 2005, Sjoerd Mullender wrote:
Derek Martin wrote:
On Mon, Oct 31, 2005 at 01:30:44PM -0600, STYMA, ROBERT E (ROBERT) wrote:
The syntax: int main(int argc, char **argv) works, but most of the C books I have seen recommend the *argv[] version.
I meant to comment that these two different notations are functionally identical; an array name is nothing more than a pointer. For example, if we have the following code:
Not true. Or rather, only partially true. In a variable declaration the two are *not* equivalent. In a parameter declaration and in an expression, the two *are* equivalent.
Not in all expressions. sizeof(array) is usually not sizeof(&array[0])
See me trim.