I am trying to convert a float to a string but I don't get anything back in my portdata[25]. Is there something I am missing? Sorry if this isn't the right forum to ask.
Thanks
#include <stdio.h>
float port=600.35;
char portdata[25];
/*
* main.c
*/
void main(void) {
sprintf(portdata,"%f",port);
}