Guest User

Untitled

a guest
Oct 22nd, 2019
104
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