This isn't really a C question, but I'm hoping some people here can help anyway. I have 2 32 bit unsigned ints representing a 64 bit unsigned int. I want to save the value to a string so I can print it out. My first thought was
But that doesn't work because I shift the top half right out of the memory space for the int. Anyone have any thoughts on how this can be accomplished, or links to point me to that discuss dealing with 64 bit values on a 32 bit system?Code:sprintf(val, "%u", ((top << 32) | bottom));