no.
"Pointer" is of type "type" as is illustrated on line 7:
type Pointer;
The name "Pointer" is actually a misnomer because it
isn't a pointer. It's an object of type "type".
So when you return Pointer on line 13:
return Pointer;
You are returning type
type
, which does not match the function's specified return type of
type*
(aka: a pointer to type).
If you want to obtain the address of 'Pointer', you can use the 'address of' operator (&):
Since 'Pointer' is of type
type
,
That means '&Pointer' is of type
type*
.
Which matches the specified return type of the function.
(This would be less ambiguous/confusing to explain if you chose names other than 'type' and 'Pointer' =x)