./byteswap <myfile >swappedfileIn Windows, I think you would type this in:
byteswap.exe <myfile >swappedfileThe program could be used to disguise files from other people, although I definitely wouldn't recommend it over encryption.
Here is the code:
#include <stdio.h>
int main()
{
int x,y;
while (1) {
x=getchar();
y=getchar();
if (y!=EOF) {
putchar(y);
} else if (x!=EOF) {
putchar(x);
break;
} else {
break;
}
if (x!=EOF) {
putchar(x);
} else {
break;
}
}
return 0;
}


Sign In
Create Account


Back to top









