Hello Team,
The questions seems to be very basic, I know.
I am trying to copy a double value into a character array, I tried sprintf and snprintf, those didn't work.
Finally I have used gcvt that is working as expected.
But when I checked my environment, gcvt was commented out in stdlib.h under a specific macro.

Because of this, when I compiled the code, I am getting a warning message,
implicit declaration of function 'gcvt' [-Wimplicit-function-declaration]
This is the IDE version I am using currently,

In my application, I have to compare to perform a firmware comparison, that's why trying to convert a double into a string, so that string comparison is easy. (Note: Initially I tried double comparison, but the results are unpredictable)
Example:
double a = 4.4000;
char arr[15] ;
sprintf(arr,"%f",a); // arr contains full of zero's, even tried with "%lf" also.
snprintf(arr,4,"%f",a); // behavior is same as above
gcvt(a,4,arr); // arr contains the 4.45
Even I googled for gcvt, looks like it is deprecated and I can't use it.
Can someone please let me know, what is missing and why I can't use sprintf?
Regards,
San