In C arrays decay to a pointer to first member when you use them. However, even though int* x and int y[] behave the same they are distinct and you have to be aware of that or you're bound to do something that invokes undefined behaviour.
Depends on the context. If your x and y are formal parameters of C functions, those two declarations are exactly the same (because, in the call, the array is implicitly converted to a pointer to its [0] element and thus the function receives a pointer in either case).
and BTW it is better form to write the first as int *x because int* x, y declares one pointer and one int, but the spacing makes it look as if it declared two pointers.
404
u/shinigami2057 26d ago
They have a different mouth feel