Last Updated : 23 Jul, 2025
Most of the time, pointer and array accesses can be treated as acting the same, the major exceptions being:
1. the sizeof operator
2. the & operator
3. a string literal initialization of a character array
4. Pointer variable can be assigned a value whereas an array variable cannot be.
int a[10]; int *p; p=a; /*legal*/ a=p; /*illegal*/
5. Arithmetic on pointer variable is allowed.
p++; /*Legal*/ a++; /*illegal*/
6. Array is a collection of similar data types while the pointer variable stores the address of another variable.
Please refer Difference between pointer and array for more details.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4