Skip to content

Instantly share code, notes, and snippets.

@jasonlvhit
Created March 1, 2014 09:53
Show Gist options
  • Save jasonlvhit/9287727 to your computer and use it in GitHub Desktop.
Save jasonlvhit/9287727 to your computer and use it in GitHub Desktop.
#C数组下标的实现
"""
其实一个例子就能说明,C中数组下标的实现方法。
................
int array[4];
array[2] 和 2[array]是等价的。
................
2[array],这是个什么玩意儿。
2[array]等价于:
*(2 + array)
array[2]等价于:
*(array + 2)
。。。。。。。。。。
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment