title: Conversion type in printf (with no casting operator)
body: <p>I'm trying to run the following code for a demonstration of how conversion works.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main()
  {
      int x=5;
      int y=2;
      float z;
      printf("x=%d\n", x);
      printf("y=%d\n", y);
  
      //Doing division as it is
      z= x/y;
      printf("With no preliminar assignment: (z=x/y)\n");
      printf("\"z\" is: %d (integer)  or %lf (double) or %f(float)\n\n\n", z, z, z);
  
      //Doing assignment before division
      printf("With the assignment: (z=x)\n");
      z=x;
      printf("\"z\" before division is:");
      printf("%d (integer)  or %lf (double) or %f(float)\n", z, z, z);
  
      //Doing division after assignment
      z/=y;
      printf("\"z\" after division with assignment: (z=z/y)");
      printf(" is: %d (integer)  or %lf (double) or %f(float)\n", z, z, z);
  
      return 0;
  }
  </code></pre>
  
  <p>The OUTPUT is:</p>
  
  <pre><code>x=5
  y=2
  With no preliminar assignment: (z=x/y)
  "z" is: 0 (integer)  or 0.000000 (double) or 0.000000(float)
  
  
  With the assignment: (z=x)
  "z" before division is:0 (integer)  or 0.000000 (double) or 0.000000(float)
  "z" after division with assignment: (z=z/y) is: 0 (integer)  or 0.000000 (double) or 0.000000(float)
  </code></pre>
  
  <p>This leave me with a doubt, also because my professor at University wrote the following code:</p>
  
  <pre><code>int x=5;
  int y=2;
  float z;
  
  int main (void) {
      z = x / y;
      return 0;
  }
  </code></pre>
  
  <p>And for him, z will assume 2.0 (Which is logically correct, but not in printf).</p>
  
  <p>So my final question is, why am I having 0 as result in all the printf?
  (I would like to not to use type casting operator)</p>