Guys, I want to know if float variables can be used in sprintf() function.
float
sprintf()
Like, if we write:
sprintf(str,\"adc_read = %d \
%g can do this:
#include <stdio.h> int main() { float w = 234.567; char x[__SIZEOF_FLOAT__]; sprintf(x, "%g", w); puts(x); }