C语言中:
*(array)
等价于 array[0]
?
因此,*(array+2)
等价于 array[2]
?
是的,例如:
假设:
int a[10];
那么
*(a + 2)
等同于
a[2]
为了保险起见。
并且仅仅是为了保险起见。a[2]
等同于
2[a]
正如其他人提到的那样,答案是肯定的,但您可能需要更好地理解。4) Taking a subscript with value i is equivalent to the operation: "pointer-add i and then type-dereference the sum", i.e.
xxx[i] = *(xxx # i)
是的,没错。(填充到所需的15个字符长度。)