C program which reads a text and count all occurrences of a particular word
#include<stdio.h>#include<conio.h>#include<string.h>
void main(){ int i=0,j=0,count=0; char str1[100],str2[20],str3[20]; clrscr(); printf("Enter the text: "); gets(str1);
printf("Enter word to count: "); gets(str2);
while(str1[i]!=
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.