If I need to null-terminate a String, should I rather use \0
or is a simple 0
also enough?
Is there any difference between using
char a[5];
a[0] = 0;
and
char a[5];
a[0] = '\0';
Or is \0
just preferred to make it clear that I'm null-terminating here, but for the compiler it is the same?