标签:
* 和++优先级是同一级别,同一级别按照从右往左的顺序计算
所以: *p++等价于*(p++)
char *a="this a book";
char *p = a;
p++;
printf("%c\n", *p);//output:h
*p++;
printf("%c\n", *p);//output:i
/* overflow
char x = (*p)++;
printf("%d\n", x);
*/
while (*p != ‘\0‘) {
printf("%c", *p++);//is
}
printf("\n");
标签:
原文地址:http://www.cnblogs.com/guxuanqing/p/5846909.html