// 最初の5文字をいれかえる (マクロ)
#include <stdio.h>

#define _swap(type, _x, _y) do {type* x=_x; type* y=_y; type t; t=*x; *x=*y; *y=t; } while (0);

void p(char* a, char* b){printf("%s\n%s\n\n",a,b);}

void main(void) {
char a[100]="aiueo1234";
char b[100]="ABCDE5678";

p(a,b);

int i=5; char *ap=a, *bp=b;
while(i-->0){_swap(char, ap++, bp++);}

p(a,b);
}

// 結果
aiueo1234
ABCDE5678

ABCDE1234
aiueo5678