Sorry for not being explicit. I use this function to get the bit representation of a number of a given type. In the first one, for example, if value is -675.78125, then the function save the number 11000100001010001111001000000000 on the bits variable. My problem is that I try to use the same function, modified like in the second function, to produce the bit representation of a double type, but this last function doesnt produce the bit representation as expected. And I dont understand why this is so.
Thank you smac and Zaita, and thak you coder777. So, accordingly, please correct me if I'm wrong, the '>>' operator only moves the block of 32 bits to the left while the remaining 32 never change their position while doing *tem>>=1. So after the iteration of 32 times it will be only 0's. Coder777, I already did the program with your suggestion and it works perfectly.