hi!

ive stumbled across this function

heres the code

of special interest is the second return statement.Code:int rev(int a){ int i=1; if((*(char*)&i)) return(a); return((a>>24)&0xff)|(((a>>16)&0xff)<<8)|(((a>>8)&0xff)<<16)|((a&0xff)<<24); }

the variable a is shifted right by certain values.

the result is masked with 1111 1111. so everywhere where a 1 is in the binary notation of the result a one will be set for that statement.

this result (either 1 or 0) is again ORed with a similar statement.

is all that correc?

well and what is that used for?

thanks alot!