Code:
        char n1[50];
	char n2[50];
	int a=0,br=0,x;
	char *p1,*p2;
	p1=n1;
	p2=n2;

	puts("word: ");
	gets(p1);
	puts("sentence: ");
	gets(p2);
	
	x=strlen(p1); 
	while(*p2 != '\0')
	{
		if(*p1 == *p2)
		{
			a++;
		}
		p2++;
	}
	printf("%d times word is shown, lenght of a word is %d",  a, x);
What I need is to show how many times the word is shown for itself and how many times like a part of a sentence. I have some idea of comparing 'word' with lenght of words in the sentence and then to use counter but i cant get it done. My brain is blocked!