title: Segmentation fault Core dumped on virtual machine
body: <p>In a function, I created the following char array.</p>
  
  <pre><code>char key1[500]="";
  </code></pre>
  
  <p>I am looping through index "i" in the function and copying values of inputFileArray which is a global variable through an index initialIndex (a global index).</p>
  
  <pre><code>key1[i++]= inputFileArray[initialIndex++];
  </code></pre>
  
  <p>This statement is resulting in error Segmentation Fault(core dumped) when I run. </p>
  
  <p>BTW, this worked fine on another machine in which I compiled using visual studio c++ editor. I get this error when I try to run this on a ubuntu 13.10 on virtual machine. Appreciate your answers.</p>