title: For what reason to change the position of this line generates a different assignment in variable?
body: <p>In the two codes below should happen exactly the same:</p>
  
  <pre><code>struct people {
      char name[25];
      int age;
  };
  
  void save() {
      FILE *fp;
  
      fp = fopen("things.sve", "wb");
  
      struct people myself;
      strcpy(myself.name, "Bruno Macabeus");
      myself.age = 18;
  
      struct people fox;
      strcpy(fox.name, "Megan Fox");
      fox.age = 22;
  
      struct people luffy;
      strcpy(luffy.name, "Monkey D. Luffy");
      luffy.age = 20;
  
      int totalPeople = 3;
      struct people some[2];
      some[0] = myself;
      some[1] = fox;
      some[2] = luffy;
  
      fwrite(&amp;totalPeople, sizeof(int), 1, fp);
      //fwrite(some, sizeof(struct people), 3, fp);
      fclose(fp);
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>struct people {
      char name[25];
      int age;
  };
  
  void save() {
      FILE *fp;
  
      fp = fopen("things.sve", "wb");
  
      struct people myself;
      strcpy(myself.name, "Bruno Macabeus");
      myself.age = 18;
  
      struct people fox;
      strcpy(fox.name, "Megan Fox");
      fox.age = 22;
  
      struct people luffy;
      strcpy(luffy.name, "Monkey D. Luffy");
      luffy.age = 20;
  
      struct people some[2];
      some[0] = myself;
      some[1] = fox;
      some[2] = luffy;
      int totalPeople = 3;
  
      fwrite(&amp;totalPeople, sizeof(int), 1, fp);
      //fwrite(some, sizeof(struct people), 3, fp);
      fclose(fp);
  }
  </code></pre>
  
  <p>I only changed the boot time of the variable "totalPeople", however, this creates a big change when I saved it. In the first case, save something strange: "66 66 79 00". In the second case, it works: "03 00 00 00".</p>
  
  <p>For what reason acontence this? It should not work in both cases? How to solve this problem?</p>