📅  最后修改于: 2022-03-11 14:44:52.933000             🧑  作者: Mango
tldr; Yes, or you risk getting a random number as the starting value.
For automatic variables:
Some compilers might do it but the standard does not require it. A conforming implementation could leave them to be uninitialized garbage values.
For static variables:
They must be initialized to zero unless explicitly initialized otherwise.