#include <unistd.h>
|
void
swab (const void * restrict src, void * restrict dst, ssize_t len); |
The argument len must be an even number.
#include <string.h> #include <stdio.h> int main() { int i=0x00003366,j=0x0; swab((void *)&i,(void *)&j,2); if(j==0x6633) printf("Ouput val = %#x\n",j); return 0; }
Output
Ouput val = 0x6633
© 2005-2007 Nokia |