Use of null statement in C

前端 未结 12 1943
挽巷
挽巷 2020-11-29 09:12

What are typical uses of null statement

;

in C ?

I know that it is basically used to skip expression where it is expected

12条回答
  •  醉酒成梦
    2020-11-29 09:52

    The only uses I can think of are:

    1- At the end of a loop, where the operations are already encoded within the loop statements. e.g. while(a[i--]);

    2- At the end of a label, where no operation is needed to be done. e.g. Label: ;

提交回复
热议问题