📜  检查字符串的正确方法在c中未初始化-无论代码示例

📅  最后修改于: 2022-03-11 15:00:21.739000             🧑  作者: Mango

代码示例1
char x[16] = { 0 }; // note the use of the initializer, it sets the first character to 0, which is all we need to test for initialization.

if (x[0] == 0)
  // x is uninitialized.
else
  // x has been initialized