line 277, 278, 282 comments enhanced (#24776)
This commit is contained in:
@@ -322,11 +322,11 @@ Most of the time, pointer and array accesses can be treated as acting the same,
|
|||||||
```c
|
```c
|
||||||
int a[10];
|
int a[10];
|
||||||
int *p;
|
int *p;
|
||||||
p = a; /*legal*/
|
p = a; /*legal, pointer p, points the starting memory address of array a that is a[0]*/
|
||||||
a = p; /*illegal*/
|
a = p; /*illegal, a is not an individual variable*/
|
||||||
```
|
```
|
||||||
5) Arithmetic on pointer variable is allowed.
|
5) Arithmetic on pointer variable is allowed.
|
||||||
```c
|
```c
|
||||||
p++; /*Legal*/
|
p++; /*Legal, p points the next memory address*/
|
||||||
a++; /*illegal*/
|
a++; /*illegal*/
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user