title: Pass a string to function get an integer array from it
body: <p>Hello this is my code and i am pretty confused about it.
  I am passing a string to a function and I am making an integer array which I need to use in the main function. I am a newbie and I want to learn how to take out arrays in these types of situations.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int *encrypt (char string[]);
  char string[1000];
  int intstring[10000], last;
  
  int main()
  {
  gets(string);
  encrypt(string[1000]);
  for (int i = 0; i &lt; strlen(string); i++){
      printf("%d ", intstring[i]);
  }
  }
  int * encrypt(char string[])
  {
  for (int i = 0; i &lt; strlen(string); i++)
  {
      if (string[i] &gt;= 65 &amp;&amp; string[i] &lt;= 90)
      {
          string[i] = string[i] - 65;
  
      }
      else if (string[i] &gt;= 97 &amp;&amp; string[i] &lt;= 122)
      {
          string[i] -= 96;
  
      }
      else if (string[i] == 32)
      {
          string[i] -= 6;
      }
      else if (string[i] == 46)
      {
          string[i] -= 19;
      }
      intstring[i] = string[i];
   }
   return intstring;
   }
  </code></pre>