I made a simple C program to get a float as input from the user using scanf() function and dispay it using printf() function. But when the input number is quite large, the output deviates slightly. Why might that happen? For example: if I give input as 2345, out put will be as expected. But if I give the output as 1234567898, the output will be unexpected.
#include <stdio.h>
int main()
{
float number;
scanf("%f", &number);
printf("The number %f", number);
return 0;
}