c语言,如下函数中,break语句跳出哪一个循环?
voidfun(char*s,char*t1,char*t2,char*w){char*p,*r,*a;strcpy(w,s);while(*w){p=w;r=t1;wh...
void fun (char *s, char *t1, char *t2 , char *w)
{
char *p , *r, *a;
strcpy( w, s );
while ( *w )
{ p = w; r = t1;
while ( *r )
if ( *r == *p )
{ r++; p++; }
else break; /*就是这个break,是跳出while(*r)还是while(*w)?*/
if ( *r == '\0' ) a = w;
w++;
}
r = t2;
while ( *r ){ *a = *r; a++; r++; }
} 展开
{
char *p , *r, *a;
strcpy( w, s );
while ( *w )
{ p = w; r = t1;
while ( *r )
if ( *r == *p )
{ r++; p++; }
else break; /*就是这个break,是跳出while(*r)还是while(*w)?*/
if ( *r == '\0' ) a = w;
w++;
}
r = t2;
while ( *r ){ *a = *r; a++; r++; }
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询