Answers for "checking if a variable is empty in C"

C
0

how to check if a string pointer is empty in c

char *c = "";
if ((c != NULL) && (c[0] == '')) {
   printf("c is emptyn");
}
Posted by: Guest on April-20-2021

Code answers related to "checking if a variable is empty in C"

Code answers related to "C"

Browse Popular Code Answers by Language