This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Float variables not working in sprintf

I am using uVison4 Compiler and STM32F103 Device.
I using sprintf then float variables not working properly.
Please help me.

float fvalue;
char cTest[10];

memset(cTest,0x00,sizeof(cTest));
fvalue=3.234;
sprintf(cTest, "%.3f", fvalue);

The results are not 3.234.
It is 0.000.

0