It is stated in my lecture notes that float is to 7 significant figures.

However, if I was to do the following in a code:

float a;
a = 123.456;
printf("a = %f", a);

then why does it print the following?

123.456000

I ask this because 123.456 is already 7 significant figures.

It just seems strange, as I could enter a number like 1234567.123 and its output will be 1234567.123000 (i.e. it will print the integer and six digits after the decimal place).

So I am just wondering exactly why my lecture notes define float as having 7 sig. figs.