If we have to hold an address of any data type then we require a pointer of that data type.
But a pointer is simply an address, and an address is always int
You can have a typeless pointer in C very easily -- you just use void *
for all pointers. This would be rather foolish though for two reasons I can think of.
First, by specifying the data that is pointed to in the type, the compiler saves you from many silly mistakes, typo or otherwise. If instead you deprive the compiler of this information you are bound to spend a LOT of time debugging things that should never have been an issue.
In addition, you've probably used "pointer arithmetic". For example, int *pInt = &someInt; pInt++;
-- that advances the pointer to the next integer in memory; this works regardless of the type, and advances to the proper address, but it can only work if the compiler knows the size of what is being pointed to.