Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is the difference between one-dimensional array and pointer in C language?
What is the difference between one-dimensional array and pointer in C language?
In C language, the array name of one-dimensional array points to the starting address of this array, and the pointer is the address of something it points to. For example, if int a[5] is defined, you can use a[ 1] or *(a+ 1) to access the second element. When the pointer points to an array, the array name and the pointer should have the same function. The pointer you defined doesn't point to anything. It is a wildcard pointer and cannot be used in a way similar to an array.