Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main () {
- char str[] = "This is a string. нннн";
- char * pch;
- int count = 0;
- pch = strchr(str, 's');
- while (pch != NULL) {
- count++;
- pch = strchr(pch + 1, 's');
- }
- printf("%i", count);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement