Answers for "how to check if string is not empty c"

C
1

how to empty string in c

// Zero whole array buffer
memset(buffer,0,strlen(buffer));
Posted by: Guest on November-29-2021
0

how to check if a string pointer is empty in c

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

Code answers related to "how to check if string is not empty c"

Code answers related to "C"

Browse Popular Code Answers by Language