Difference between int* p and int *p declaration [duplicate]

There is no difference.

It’s a matter of notation, not semantics. The second is less misleading, because

int *a, b;

is clearly declaring an int* and an int, whereas

int* a, b;

looks as if it’s declaring two pointers, when it’s really doing the same thing as above.

Leave a Comment