Answers for "c if string is empty"

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 "c if string is empty"

Code answers related to "C"

Browse Popular Code Answers by Language