title: How does this clean up the empty space in an array?
body: <pre><code>void empty_spaces(char array[]){
   int j=0,i=0,n=0;
   n=strlen(array);
   while(i&lt;n){
      if(array[i]==' '){
          j=i;
          while(j&lt;n){
               array[j]=array[j+1];
               ++j;
          }
          --n;
      }else
           ++i;
   }
   if(n&gt;15)
           n=15;
   array[n]='\0';
  }
  </code></pre>
  
  <p>Could someone explain me, this code? This function cleans up the empty spaces in array, but could someone explain me exactly what it works?</p>