/* * C Program to Find the Frequency of Every Word in a * given String */ #include #include void main() { int count = 0, c = 0, i, j = 0, k, space = 0; char str[100], p[50][100], str1[20], ptr1[50][100]; char *ptr; printf("Enter the string\n"); scanf(" %[^\n]s", str); printf("string length is %d\n", strlen(str)); for (i = 0; i %d times\n", ptr1[i], c); c = 0; } } /* *OUTPUT: Enter the string welcome to sanfoundry's class, welcome to c class string length is 48 welcome -> 2 times to -> 2 times sanfoundry's -> 1 times class -> 2 times c -> 1 times */