title: Example on building a struct goes to crash
body: <p>I'm learning structs in C and, based on my tutorial, I created this sample code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  main()
  {
    //Creating a struct
    struct automobile {
           char make[150];
           char model[200];
           int cylinders;
           float horsepower;
           };
    struct automobile m_auto;  //Istantiate m_auto as automobile struct
  
    //Taking details as input
    printf("Car Make: ");
    scanf("%s", m_auto.make);
    printf("Model: ");
    scanf("%s", m_auto.model);
    printf("No. of cylinders: ");
    scanf("%i", m_auto.cylinders);
    printf("HP: ");
    scanf("%f", m_auto.horsepower);
    printf("--------------------------------\n");
    printf("You just entered:\n");
    printf("MAKE: %s , MODEL: %s , CYLINDERS: %i , HORSEPOWER: %2f \n", \
                   m_auto.make, m_auto.model, m_auto.cylinders, m_auto.horsepower);
  }
  </code></pre>
  
  <p>I compile and everything goes ok but as soon as I run the app and input the number of cylinders the app crashes. I'm using Bloodshed Dev C++ to run, don't know if it's something wrong in my code or a compiler issue.
  What's wrong?</p>