统计一个给定字符串中指定的字符出现的次数
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
char source[80],dest[5];
int len_s,len_d,*count;
int temp,i,j;
while(1)
{
gets(dest);
gets(source);
if (strcmp(dest,"#")==0)
break;
else
{
len_s=strlen(source);
len_d=strlen(dest);
count=(int *)malloc(sizeof(int)*len_d);
for(i=0;i<len_d;i++) {="" temp="0;" j="0;" while(j!="len_s)" if(dest[i]="=source[j])" j++;="" }="" else="" count[i]="temp;" for(i="0;i<len_d;i++)" printf("%c="" %d\n",dest[i],count[i]);="" return="" 0;="" <="" pre=""><br>
<br> </len_d;i++)></stdlib.h></string.h></stdio.h>