Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - swab http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   swab

   Usage
   #include <string.h>
   void swab(char *source,char *destination,int n);

   Description
   Copies  n bytes from source swapping each pair of adjacent bytes.  The
   converted  string  is stored at destination. The integer n  should  be
   even as pairs of characters are swapped.

   Example
   #include <stdio.h>
   #include <string.h>
   char *string1 = "badcfehgjilknm";
   char *string2 = "..............";
   main()
   {
        swab(string1,string2,14);
        printf("string1 [%s] string2 [%s]\n",string1,string2);
   }


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson