SHARE
TWEET

Untitled

a guest Oct 22nd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int findChar(char *str, char c)
  2. {
  3.         if(!str) return -1;
  4.  
  5.         int i=0;
  6.         while(str[i]) {
  7.                 if(str[i] == c) return i;
  8.                 i++;
  9.         }
  10.  
  11.         return -1;
  12. }
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