title: Convert string array to array with ascii codes
body: <p>I'm trying to convert every character of a string to its ASCII code. The string array comes from stdin.</p>
  
  <p>I'm trying to loop through the string and convert every character to ASCII with atoi() and add this ASCII code to a new int array.</p>
  
  <pre><code>char s2[1024];
  fgets(s2, 1024, stdin);
  int arr[1024]; 
  int i = 0;
  while (i &lt; strlen(s2))
    {
    char * start = s2;
    int j = 0;
      while(start != "\0")
      {
        arr[j++] = atoi(start);
      }
      i++;
    }
  </code></pre>
  
  <p>I'm pretty new to C and I thought this could work, but I get an "segmentation fault (core dumped)" when I run the code. I know this error has to do something with the memory, but I don't know how to debug it.</p>