This is a electronic dictionary program.But in this program, how can dict[i][0] compare to space.And it's going to be true.And how in the last if part dict[i][0] compare to space.Please anyone explain.
#include<stdio.h>
#include<string.h>
int main(void)
{
char dict[][2][40] = {
"house","a place of dwelling",
"car","a vehicle",
"computer","a thinking machine",
"program","a sequence of instruction",
"",""
};
char word[80];
int i;
printf("Enter word: ");
gets(word);
i = 0;
while(strcmp(dict[i][0], "")){
if(!strcmp(word, dict[i][0])){
printf("Meaning: %s", dict[i][1]);
break;
}
i++;
}
if(!strcmp(dict[i][0], ""))
printf("Not in dictionary\n");
return 0;
}