title: Change letter in array for 3 different letter
body: <p>I need to change the text in array in a way, that everywhere I have <code>a</code> character, I need to change it to<code>123</code>. </p>
  
  <p>Example: for the given text: <code>ayasxka</code> I should got this: <code>12123k123</code> or this <code>12323k123</code> text. </p>
  
  <p>I almost got it to work, but instead of <code>k</code> between numbers, I got <code>s</code>, I mean, this is my result: <code>12123s123</code>.</p>
  
  <pre><code>int main()
  {
      int i, j = 0;
      char t[] = "ayasxka";
      char *r = malloc(sizeof(char) * (strlen(t) + 2));
      memset(r, '\0', (strlen(t) + 1));
  
      for(i=0; t[i] != '\0'; i++)
      {
          if(t[i] == 'a')
          {
              r[i] = '1';
              r[i+1] = '2';
              r[i+2] = '3';
          }
          else
              r[i+2] = t[i];
      }
  
      printf("%s\n", r);
      free(r);
  
      return 0;
  }
  </code></pre>