I just read that we need to give the type of pointers while declaring them in C (or C++) i.e.:
int *point ;
As far as I know, pointers sto
So that it can perform arithmetic and other operations. Consider these two examples:
int* p; /* let the address of the memory location p pointing to be 1000*/
p++;
printf("%u",p); /* prints 1004 since it is an integer pointer*/
char *p; /* let the address of the memory location p pointing to be 1000*/
p++;
printf("%u",p); /* prints 1001 since it is an char pointer*/
I hope this helps you !