Internal static variables in C, would you use them?

后端 未结 13 1529
甜味超标
甜味超标 2020-12-07 19:09

In C you can have external static variables that are viewable every where in the file, while internal static variables are only visible in the function but is persistent

13条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 19:42

    A simple use for this is that a function can know how many times it has been called.

提交回复
热议问题