Is int * a derived datatype or not?
I got this confusion because I feel that these two cases are contradicting in regard to this question.
case 1:
Assumption: int * is to be considered as a derived datatype. then considering this below given code -
void someRandomFunction()
{
int* a, b, c, d;
int e, f, g, h;
....
....
....
}
In this function, if we need to consider int * as a derived datatype, then just like e, f, g, h are variables of int datatype, all the variables a, b, c, d must be pointers pointing to int datatype, right?
But since it is only a which is a pointer pointing to int datatype, so does this disprove our assumption of this case?
Case 2:
Assumption: int * is not to be considered as a derived datatype. then considering this below given code -
int* MyFunc()
{
int *p;
....
....
....
return p;
}
Here, int * is instructing the return's datatype to the compiler, right? So, Does this prove that int * is a derived datatype, i.e., does this disprove our assumption of this case?