C/PTA —— 12.指针1(课内实践)6-1 交换两个整数的值6-2 利用指针找最大值6-3 字符串的连接6-4 移动字母6-1 交换两个整数的值void fun(int* a, int* b){int* tmp = *a;*a = *b;*b = tmp;}6-2 利用指针找最大值void findmax(int* px, int* py, int* pmax){*pmax = *px > *py " />*px : *py;}6-3 字符串的连接char* str_cat(char* s, char* t){strcat(s, t);return s;}6-4 移动字母void Shift(char s[]){char ch[3];int count = 0;for (int i = 0; i < 3; i++)//存储前三个字符{ch[i] = s[i];}for (int i = 0; i < strlen(s) - 3; i++)//将后面的字符往前挪动覆盖{s[i] = s[i+3];count++;}for (int i = count,j=0; i < MAXS,j<3; i++,j++)//将存储的前三个字符存储到s数组的后面{s[i] = ch[j];}}