Whatever the size of buff, it always show 8 characters.why? how much size is allocated to buff ?? 2 bytes ? If we take one character of one byte than it should only store 0. in buffer .. what's happening here ?
1 2 3
float n = 0.5;
char buff[2];
sprintf(buff, "%f", n);