how to represent null string in c code example
Example 1: how to denote an empty string in c
#include <stdio.h>
#include <string.h>
int main()
{
char empty[5] = { '\0' };
char null[5];
if( strcmp(empty,null)==0 )
puts("Strings are the same");
else
puts("Strings are not the same");
return(0);
}
Example 2: c null define
#define NULL ((void *)0)