fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // ABHIJEET
  5. char s[200];
  6. gets(s);
  7. int l,i,count=0,j;
  8. l=strlen(s);
  9. for(i=0;s=='\0',i<=l;i++)
  10. count++;
  11. j=l-count;
  12. printf("%d is word in given sentence",j);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 4408KB
stdin
this pen is good to write
stdout
-1 is word in given sentence