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

后端 未结 4 791
借酒劲吻你
借酒劲吻你 2021-02-14 08:53

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条回答
  •  时光说笑
    2021-02-14 09:25

    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

提交回复
热议问题