How do I convert double value to a char array in C?
double a=2.132; char arr[8];
Is there any way to do this in standard C? Can anyone give
If you are about to store the double DATA, not the readable representation, then:
#include double a=2.132; char arr[sizeof(a)]; memcpy(arr,&a,sizeof(a));