Code:
#include <stdio.h>
#include <stdlib.h>
#define SIZE 2
main()
{
int i,j;
char aac[][SIZE] = {{'a','b'},{'c','d'},{'\0'}}, *as[] = {{"Ola"},{"Adeus"},{'\0'}};
puts("char aac[][2]\n");
for (i=0; i<SIZE-1 ; i++)
puts(aac+i);
puts("\n\nchar *as[]\n");
for(i=0; as[i]!='\0' ; i++)
puts(as[i]);
}
If I write that last for loop as as[i][0]!='\0' the cmd crashes, but this way it doesn't. Does this mean that NULL is not a character?
Code:
strlen(n)