Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int alpha_num(const char *str){
- static int i=0;
- static int counter=0;
- if(i==strlen(str))return 0;
- if(str[i]>='A' && str[i]<='Z' || str[i]>='a' && str[i]>='z'){
- counter++;
- i++;
- return alpha_num(str);
- }
- else{
- counter++;
- return alpha_num(str);}
- }
- int main(){
- char word="myWord67this";
- printf("%d",alpha_num(word));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement