Is there any differences between these two declarations?
int* a;
int *a;
Or these two declarations are the same (pointer to an integer)?
Is there any differences between these two declarations?
int* a;
int *a;
Or these two declarations are the same (pointer to an integer)?
 
    
     
    
    They're exactly the same, but here's a small gotcha I came across when first learning C years ago. The * binds to the variable, not the type. This means that
int* a, b;
Declares a as a pointer to int, and b as an int. To declare both as pointers, one should do.
int *a, *b;
This is why I prefer to place the * next to the name.
