求教问题,亟待回复
#include "stdio.h"void sub1(char a,char b)
{char c;c=a;a=b;b=c;}
void sub2(char *a,char b)
{char c;c=*a;*a=b;b=c;}
void main()
{char a,b;
a='A';b='B';sub2(&a,b);printf("%c%c",a,b);
a='A';b='B';sub1(a,b);printf("%c%c",a,b);
}
这个问题的答案是BBAB
到底怎么回事