初期化してchar x[16]
いないものがあります。何かが割り当てられてx
いるかどうか、または実行時にどのように作成されるかをテストする必要があります。どうすればいいですか?ありがとうございました
サンプルコード
int main(int argc, char** argv) {
char x[16];
//<other part of the code>
if(x is an empty char array (not assigned anything) then skip the next line) {
//blank
}else {
//<rest of the code>
}
return 0;}
PS:試しましたがmemchar(x, '\0', strlen(x))
、 char配列にはデフォルトで含まれif(x[0] == '\0')
てif(!x[0])
いないため、希望どおりに機能しません。\0