标签:
#include<stdio.h> void fun(char *s,int *t) { int i,n=0; for(i=0;s[i]!=0;i++) if(s[i]>='0'&&s[i]<='9') n++; *t=n; } main() { char s[80]="asdf45edx7sd7"; int t; printf("\nThe original string is :%s\n",s); fun(s,&t); printf("\nThe result is :%d\n",t); }
标签:
原文地址:http://blog.csdn.net/u013116579/article/details/38150903