Q
qazmlp
I have to store the value of a 'long long' number in Hex format into a buffer.
What is the correct & best way of doing it so?
E.g.: If the number is: 374643194001883136, the stored value should be
0x0533000000000000
What I have currently is something like this:
long long Id = 374643194001883136LL ;
char IdInHexBuf[50]= {0} ;
sprintf( IdInHexBuf , "%#018llx" , Id ) ;
Any comments to improve this code?
What is the correct & best way of doing it so?
E.g.: If the number is: 374643194001883136, the stored value should be
0x0533000000000000
What I have currently is something like this:
long long Id = 374643194001883136LL ;
char IdInHexBuf[50]= {0} ;
sprintf( IdInHexBuf , "%#018llx" , Id ) ;
Any comments to improve this code?