|
From: <Rub...@al...> - 2006-05-16 14:59:19
|
Hello:
I hope this example could help you.
Regards.
#include <stdio.h>
#include <stdlib.h>
main(){
long x,y,z;
scanf("%lx",&x);
x = x & 0xffffffff; /*number of bits = 32 */
y = x & 0xff000000; /*MSB = most significant byte */
z = y >> 24; /* shift right 24 bits */
y = x << 8; /* shift left 8 bits */
y+=z;
printf("\n%lx\n",y);
system("pause");
return;
}
Ruben Savia
Datacom Services
Alcatel de Argentina S.A.
e-mail : rub...@al...
Phone: 5411 4349 - 1111 ext.1001
Fax: 5411 4349 - 1199
Alcanet : 2930-1001
Web site: www.ind.alcatel.com
|