reference

declaration and definition

A definition is the special kind of declaration that creates an object; a declaration indicates a name that allows you to refer to an object created here or elsewhere。

声明Declaration:描述在其他地方创建的对象,并不分配内存。(可以出现在多个地方)
定义Definition:产生一个新的对象,并分配内存。(只能出现一次)

The symbol appearing on the left of an assignment is sometimes called an l-value (for “left-hand-side” or “locator” value), while a symbol on the right of an assignment is sometimes called an r-value (for “right-hand-side”). The compiler allocates an address (or l-value) to each variable. This address is known at compiletime, and is where the variable will be kept at runtime. In contrast, the value stored in a variable at runtime (its r-value) is not known until runtime. If the value stored in a variable is required, the compiler emits code to read the value from the given address and put it in a register.

等于

对于编译过程中数组会转化为指针的情况,数组和指针可以互换,比如:声明为函数参数的时候 fun(int a [])和fun(int a )是等同的。因为编译的过程中fun(int a [])
中的数组会转化为指针形式,也就和fun(int
a )的效果一样了。

如果编译到时候数组不被当做指针处理,那么声明的时候不能等同。对于这种情况,数组和指针是不一样的的,在运行时的表示形式也不一样,并可能产生不同的代码。
对编译器而言,一个数组就是一个地址,一个指针就是地址的地址。

等于