函式名: swab
功 能: 交換相臨的兩個位元組
用 法: void swab (char *from, char *to, int nbytes);
程式例:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
char source[15] = "Frank Borland";
char target[15];
int main(void)
{
swab(source, target, strlen(source));
printf("This is target: %s\n", target);
return 0;
}
運行結果:
This is target:rFna koBlrnad