title: Why does ceil return 0.000 in the following code?
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;math.h&gt;
  int main()
  {
  float i = 2.5;
  printf("%d, %f", floor(i), ceil(i));
  return 0;
  }
  </code></pre>
  
  <p>Although I have used %f specifier in printf() for ceil, it prints 0.000000. Why is this so?</p>