title: select sort algorithm (C)
body: <p>Im trying to study some algorithm questions and I can't find a way to start my select sort algorithm code. Im using Visual Studio and the code doesn't show any errors through compiling. When I start the code the system just stops for a few seconds and print "press any key to continue...". Im a beginner and I can't see what's wrong. HELP MEEE</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int n = 6;
  
  int qwerty(int a[]) {
      int i, j, t;
      for (i=1; i&lt;=n-1; i++){
          for (j=i+1; j&lt;=n; j++){
              if (a[i] &gt; a[j]){
                  t = a[j]; 
                  a[j] = a[i]; 
                  a[i] = t;
              }
          }
      }
  }
  
  int main(void) {
      int a[6] = { 2, 14, 20, 8, 17, 13 };
      qwerty(a[n]);
      int i;
      for (i = 1; i &lt;= n; i++){
          printf("%d ", a[i]);
      }
  }
  </code></pre>