There is no difference; the ad is parsed as if it were written float (*varname); .
In C and C ++, declarations are centered around expressions, not objects; basically, the form of the declaration should match the form of the expression in the executable code (IOW, using simulated declarations). For example, if you have a pointer to an integer named p and you want to access this integer value pointed to by p , you cast the pointer like this:
x = *p;
Expression Type *p - int; so the declaration should look like
int *p;
Similarly, if you have an int array called arr and you want to access the integer value in a specific element i , you should write
x = a[i];
Type of expression a[i] - int; so the declaration should look like
int a[N];
In the above examples, *p and a[N] are called declarators; declarators enter the name of the declared object along with additional type information not specified in the type specifier. The intensity of both p and a provided by an int specifier, but the pointer p and the array a provided by their respective declarators.
This is an important point and something that needs to be emphasized; * like int *p; , so int* p; tied to the declaration, not the type specifier, regardless of the space. The fact that you can write it anyway is an accident of the C (and C ++) syntax, and as a result there is a school of thought that pointer variables should be declared as T* p; unlike T *p; since type p is a "pointer to T". My problem is that reasoning only works for simple pointer types; we cannot treat an array or types of functions in the same way. For example, we cannot write int[N] arr; although the arr type is "N-element array of int". It really crashes when we get the declaration of pointers to arrays or pointers to functions or their combinations. For example:
int *(*(*(*farr)())[N])();
The farr type is "a pointer to a function that returns a pointer to an array of N-elements of function pointers that return pointers to int". Everything except "int" is part of the declarator; notation int* (*(*(*farr)())[N])(); or even int*(*(*(* farr)())[N])(); will be just stupid.
I believe that insisting on writing T* p; for declarations of pointers leads to more confusion, no less. Since Stroustrup and the legions of C ++ programmers would like to pretend otherwise, declarations in C and C ++ are centered around expressions, not objects.
Since I am part of a larger C ++ code writing team, I follow consistent coding rules that include declaring the pointer and references as T* p; and T& r; but it makes me grind my teeth every time I have to do it.