The underlying input functions can determine which of the alternatives have been used, without needing to know how many decimal places there are for instance. It is important to know what variant of float or double the value is to be stored into, however.
scanf("%d",&i); c = getchar; scanf("%d",&j);
scanf("%d%c%d",&i,&c,&j);