This question has already been answered:

On websites and in books there are various announcements and the use of pointers:

char *p; 

and

 char* p; 

Is there any difference between them? When what spelling is used?

Reported as a duplicate by Anton Shchyrov , Spirit of the Community 28 Sep '18 at 12:17 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    Absolutely none, like char*p or char * p . The compiler simply ignores spaces. A matter of taste (or adopted in the team where you work, programming style).

    But!

    Remember that

     char * p, i; 

    this is a declaration of a pointer p and a variable i type char ( i is not a pointer!).