#include <stdio.h>/*1. Memory addressing from large to small, priority allocation memory address larger bytes to the variable 2. The more the variable is defined, the greater the memory address is 3. Gets the address of the variable:& variable name 4. Output Address:%p 5. A variable must be advanced to initialize in order to use*/intMain () {//memory addressing from large to small intA =Ten; intb = -; intC; //& is an address operator that gets the address of the variable//%p used to output addresses//0x7fff56f09bc8printf"the address of A is:%p\n", &a); //0x7fff56f09bc8printf"The address of B is:%p\n", &b); //0X7FFF56F09BC4printf"the address of C is:%p\n", &c); //0x7fff56f09bc0//int d = c + 1; //since the variable c is not initialized, it is not right to use it directly .printf"the value of C is%d\n", c); //the value of C is 1606416536 return 0;}/*int A; with int a=0 initialization difference*/voidTest () {intA; printf ("the value of a is:%d\n", a); //the value of a is: 1606422622 { intA=0; printf ("the value of a is:%d\n", a); //the value of A is: 0 }}
650) this.width=650; "title=" image "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/5B/F1/wKioL1UXxNOQTPdfAAC_ Mavoksy110.jpg "" 598 "height=" 202 "/>
"Good programmer notes Sharing" memory analysis of variables in C language