C language checks whether the string pointer is null
Example: check if a string pointer is empty in C language
#include <stdio.h>
#include <stdlib.h>
int main()
{
char *c = "";
if ((c != NULL) && (c[0] == '\0')) {
printf("c is empty\n");
}
return 0;
}