填空题
以下程序运行时输出到屏幕的结果中第一行是
1,第二行是
2,第四行是
3。
#include<iostream.h>
void f(char *p1,char *p2)
{
int count1=0,count2;
while(p1[count1]!="/0")
{
count2=0;
while(p2[count2]!="/0")
{
if(p1[count1]==p2[count2])
{
cout<<count2<<"/t"<<p1[count1]<<endl;
break;
}
count2 ++;
}
count1 ++;
}
}
void main(void)
{
char *str1="abcdefghijk";
char *str2="123i4bc78h9";
f(str1,str2);
}