What does “static” mean in C?

后端 未结 19 1962
误落风尘
误落风尘 2020-11-21 05:18

I\'ve seen the word static used in different places in C code; is this like a static function/class in C# (where the implementation is shared across objects)?

19条回答
  •  孤独总比滥情好
    2020-11-21 05:38

    A static variable value persists between different function calls andits scope is limited to the local block a static var always initializes with value 0

提交回复
热议问题