Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. int pf(int c){
  5.     return 'a'<=c && 'z'>=c;
  6. }
  7. int fv(char *str, int (*pf)(int)){
  8.     int db=0;
  9.     for(; *str;str++){
  10.         if(pf(*str)) db++;
  11.     }
  12.     return db;
  13. }
  14. int main(){
  15.     char szoveg[]="ASDasd123";
  16.     printf("%d", fv(szoveg, isdigit));
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement