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++ 3.0r4 - <b>swab</b> 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>
   #include <stdlib.h>

   char *string1 = "badcfehgjilknm";
   char *string2 = "..............";

   int main()
   {
       swab(string1,string2,14);
       printf("string1 [%s] string2 [%s]\n",
   string1,string2);
       return EXIT_SUCCESS;
   }

   These function calls can be nested. If two calls are made to the off
   function, two calls will also be needed to the on function in order to
   reactivate the feature.

See Also

   spawn, system



See Also: spawn system

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