There is no such thing as an "array to pointer." What you might be asking is "array of pointers." An array of pointers is just that, an array in which the variables are pointers. In C this would be an array of pointer variables that are each 4 bytes in size. It is declared like this: int *pointers; A pointer to an array is a pointer that points to the whole array. For example, in C if you have int numbers; int (*pointerToArray) = numbers + 2; pointerToArray points to the third element of numbers, which is itself an array.
char c; //array of 3 chars char * p; //pointer of type char p=c; //point the pointer to the base of char array
In the C and C++ languages the array notation arr[i] is completely equivalent to the pointer notation *(arr + i).
There is a difference: a pointer is a number that literally points to a place in memory. Arrays are groupings of a type. There is a close relationship between pointers and arrays, however: every expression with arrays (example: array[i]) can be expressed with pointers (example: *(array + i)), because for the computer, an array is just a list of pointers to the type of the array.
the address of variable (pointer) that contains array
You cannot add elements to a fixed array in C or C++. If, however, the array is declared as a pointer to an array, you can add elements by allocating a new array, copying/adding elements as needed, reassigning the new array to the pointer, and deallocating the original array.
There is no similarity between the two.
Arrays are implemented as pointers in c.
arrays are the reserved sets of variables, which are supposed to store the similar data. pointers are the special variables which store the address of other variables.
The difference that i learnt very recently and the one i remember :-)Reference cannot be changed whereas pointer value can be changed.Actually, const pointer = reference.
the simple and efficient way to pass an array is pointer to an array like that int (*p) ; // pointer to an array of integer having 30 element
The difference between a character array and an integer array in C (and also in C++) is simply one of size (and, thus, range) of the elements. In C and C++, characters are the smallest integers, usually one byte long. Other than size; chars, short, int, and long are the same fundamental type - integral.