SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. ifstream in("bio.in");
  4. int f(char s[256],char a[50])
  5. {
  6.    char *p;
  7.    int c=0;
  8.    p=strstr(s,a);
  9.    while(p)
  10.    {
  11.        c++;
  12.        p=strstr(s,a);
  13.    }
  14.    return c;
  15. }
  16. int main()
  17. {
  18.     char s[256],a[50];
  19.     in.getline(s,256);
  20.     in.getline(a,256);
  21.     cout<<f(s,a);
  22.  
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top