C语言初学者容易懵逼的代码,开始我也懵逼了

很简单 但是很有意思,分享代码 给大家

#include<stdio.h>
int main(int argc,char*argv[])
{
	int arr[5]={10,20,30,40,50};
	int *p=arr;
	printf("*p++=%d\n",*p++);
	printf("(*p)++=%d\n",(*p)++);
	printf("*(p++)=%d\n",*(p++));
}

读代码分别计算出*p++,(p)++,(p++)的值
答案在下面






























大佬路过,小白想不明白的可以留言
运行结果:
*p++=10
(*p)++=20
*(p++)=21

posted @ 2020-08-07 02:42  坑翁  阅读(8)  评论(0)    收藏  举报