I am trying to learn string in c. I have written this program. I want this program will terminate for a particular word (press ENTER after typing the word). Its Compile well but after given input when I pressing enter it shows me this message: test.exe has stopped working. Here "test" is the name of my program. Please help me to understand this.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
int i, j;
char *str[10];
for(i=0; i<10; i++)
{
//gets(str[i]);
scanf("%s",str[i]);
if(str[i]=="man") break;
}
for(j=0; j<10; j++)
{
printf("%s\n",str[j]);
}
return 0;
}