I need to convert recursively char[] into float variable. My code is as follows:
while(1)
{
//take char[] str as input
sscanf(str,"%f",&n);
//printf n
}
The program works well for positive numbers. But if we give negative numbers initially followed by positive numbers then n is displaying different output.