Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int findChar(char *str, char c)
- {
- if(!str) return -1;
- int i=0;
- while(str[i]) {
- if(str[i] == c) return i;
- i++;
- }
- return -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement