(5) 从键盘输入2个字符串,计算字符串str1中字符串str2出现的次数。要求:不使用字符串比较库函数,直接使用指针进行字符比较。部分程序代码如下:#include <stdio.h>main() {char str1[81],str2[20],*p1,*p2; int sum=0; printf("please input two strings\n"); scanf("%s%s",str1,str2); p1=str1; p2=str2; … printf("%d",sum);} 这是我的答案:while(*p1!=0) if(*p1==*p2) { p1++; p2++; if(*p2==0) sum++; } p2=str2;没有反应,也没说有什么问题,求指教Attention:不使用字符串比较库函数,直接使用指针进行字符比较。