If you replace your printf formatting with the correct format, then the right value is printed.
printf("%d\t%f\t%d\n", a, b, c);
We saw that the value of c is fine, so I'd speculate that it's just printf that doesn't handle correctly when you try to print a floating point number as an integral number. The following data to be printed suffers the mistakes made before.