How to shift bits in unsigned long long
I have created a function in my C application intended to return values like “1.25GB”, “4.60MB”, “1.40KB” rather than the numeric values they represent (I hope I said that properly). It’s based on a PHP bit of code I’ve had forever that works like this: