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 what you are asking is how to find out what bytes make up the double value in memory, try this:
double a=2.132; double darr[1] = { a }; char *arr = (char*) darr;
although you probably want unsigned char, not char