I've got some code I'm mantaining with the following variable declaration:
char tmpry[40];
It's being used with this function:
char *SomeFunction(char *tmpryP) {
// Do stuff.
}
The function call is:
SomeFunction(&tmpry[0]);
I'm pretty damn sure that's just the same as:
SomeFunction(tmpry);
I've even checked that the char* pointer in SomeFunction ends up pointing to the same memory location as the array in both cases.
My question is a sanity check as to whether the two function calls are identical (and therefore the original programmer was just being nasty)?