错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Initialize Variables Before Using Them

  • Slobodan Dmitrović

摘要

When we declare local variables, they are not initialized. Their values are undetermined. Trying to access uninitialized variables causes undefined behavior. One use case would be trying to print local, uninitialized variables. The following example demonstrates what should be avoided: