#include "stdio.h"
int swap(char* x,char* y){
      int n=0;
      while((*x==*y) && *x != '\0'){
          x++;
          y++;
          n++;
      }
      return n;
}
int main(){
    char *s1="abc",*s2="123";
    printf("%d",swap(s1,s2));
}
#功能是统计x和y所指字符串中最前面连续相同的字符的个数 
注意*x 和x++ 他们来实现指针指向的字符的移动










