swab函数

   函数名: swab
  功 能: 交换字节
  用 法: void swab (char *from, char *to, int nbytes);
  程序例:  
    #include <stdlib.h>
   #include <stdio.h>
   #include <string.h>
   char source[15] = "rFna koBlrna d";
   char target[15];
  int main(void)
   {   
      swab(source, target, strlen(source));
    printf("This is target: %sn", target);
    return 0;
   }
     结果:
     This is target:Frank Borland
posted @ 2011-03-03 12:15  潜龙9527  阅读(568)  评论(0编辑  收藏  举报