标签:des style blog color os io for re
#include<stdio.h> void main(){ int a[5]={1,2,3,4,5},i; int *p; p=&a[0]; printf("指针加:\n"); for(i=0;i<5;i++) //addtion { printf("a[%d]=%d ",i,*p); //指针当前所指向的值 printf("%u\n",p); //指针当前位置 p++; //adress move + } printf("指针加:\n"); p--; for(i=0;i<5;i++) //subtraction { printf("a[%d]=%d ",i,*p); //指针当前所指向的值 printf("%u\n",p); //指针当前位置 p--; //adress move - } }
标签:des style blog color os io for re
原文地址:http://www.cnblogs.com/thrive/p/3865930.html