I have a char x[16]
that I have not initialized, I need to test if something is assigned tox
or is it how it is created in the run time. how can I do it? Thank you
example code
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: I tried memchar(x, '\0', strlen(x))
, if(x[0] == '\0')
and if(!x[0])
but it doesn't work as I want since char array does not contain \0
by default.