申请内存地址的方向
小结:
1、高->低;
LITTLE-ENDIAN(小字节序、低字节序) BOM——Byte Order Mark 字节序标记 数据在内存中的存放顺序
#include <stdio.h> typedef struct { char *title; } Book; typedef struct { int price; } Car; void T(Book b,Car c,int arr,char *ch,char chr) { printf("&b,&c-%d;%d;",&b,&c); printf("%d;",&c); printf("array-%d;;",arr); printf("char *ch,ch=%d;",ch); printf("char chr,chr=%d;",chr); printf("char chr,&chr=%d;\n",&chr); int ia=5,ib=6; char *inCharA="incharA",*inCharB="inCharB",*inCharC="i"; printf("%d;%d;\n%d;%d;%d;\n%d;%d;%d;",&ia,&ib,inCharA,inCharB,inCharC,&inCharA,&inCharB,&inCharC); } int main(void) { Book b; b.title="road to it"; Car c; c.price=123; printf("&b,&c-%d;%d;",&b,&c); int array[3]= {0,1,2}; printf("array-%d;;",array); char *testChar="char123"; printf("%d;",testChar); printf("%d;",*testChar); printf("\n"); T(b, c,array, *testChar,testChar); return 0; }