Understanding more about i++ and i=i+1

后端 未结 4 1059
Happy的楠姐
Happy的楠姐 2021-02-14 08:54

I was wondering if there is difference between the two forms of increment. Some of the links says i++ is faster that i=i+1;

Also as one of the person my observation is

4条回答
  •  Happy的楠姐
    2021-02-14 09:24

    rmv=10;

    rmv=rmv++;//rmv+1 both are same

    printf("1.time=%d",rmv);

    //output is 10 than second time increment 10+1 so,value is11

    printf("2.time=%d",rmv++);//value is 11

提交回复
热议问题