All submissions for this problem are available.
Write the shortest C function that takes a data type of length 8 bit as argument and returns a same type of same length with all the bits of the argument reversed, i.e. the ith bit of the result is the (w-i)th bit of the argument, where w is the width of the data type in bits.
Arbitrary values of 8bit length (1 2 3 4…)
Integer value of corresponding input value with all its bits reversed.
Input: A Output: -126
|Time Limit:||0.2 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, PYTH 3.5, PYPY, GO, NODEJS, rust, swift, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.