Answers for "how to check whether a string is not 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 "how to check whether a string is not empty in c"

Code answers related to "C"

Browse Popular Code Answers by Language