Use of null statement in C

前端 未结 12 1938
挽巷
挽巷 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

    After a label at the end of a function (or more precisely, at the end of any block), e.g.

    void foo(void)
    {
        // ...
    
    exit:
        ;
    }
    

提交回复
热议问题