Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how to check if a string pointer is empty in c

char *c = "";
if ((c != NULL) && (c[0] == '')) {
   printf("c is empty
");
}
 
PREVIOUS NEXT
Tagged: #check #string #pointer #empty
ADD COMMENT
Topic
Name
4+7 =