Is there any difference between
static int * pn;
and
int static * pn;
Basically I am looking for difference between a pointer pointing to a static variable, and a static pointer pointing to some variable, and not sure whether the above 2 declarations corresponds to them.
No, there is no difference. Here, the declaration specifier sequence is
static intorint staticand the order of specifiers in a declaration specifier sequence doesn’t matter. Both of your declarations have type “pointer to int”.You can do other weird stuff like
int static unsigned const* pn;if you hate people enough. I wrote a question/answer that covers this topic.