Question: what is the difference between int *ptr and int* ptr?
Answer: To the compiler, there is no difference between the two declarations. ... For example, both of the following statements declare only one pointer. int* ptr, foo, bar; int *ptr, foo, bar; This statement declares multiple pointers, which prevents using the "int*" spacing.