title: how to interlace two strings in c
body: <p>I'm trying to write a program that accepts two string inputs in C that will then yield the result as the two strings interlaced.</p>
  
  <p>An example of what I want:</p>
  
  <pre><code>input: abdc
  input: efgh
  
  result: aebfdgch
  </code></pre>
  
  <p>Here is the little bit of code that I have so far for that portion.</p>
  
  <pre><code>#include &lt;stdio.h&gt; 
  #include &lt;string.h&gt;
  
  #define maxLen 100
  
  int main() {
  
     char string1[maxLen];
     char string2[maxLen];
  
     printf("please enter a string of up to 100 characters: ");
     fgets(shuffleString,maxLen,stdin);
  
     printf("please enter another string of up to 100 characters: ");
     fgets(shuffleString2,maxLen,stdin);
  
     return 0;
  }
  </code></pre>
  
  <p>I have tried a lot of things to make the shuffling work, but nothing I seems to. This is for a homework assignment so I'm not trying to have someone write the code for me, but some examples and explanations would be nice. Also, if it's not already obvious, this is for an introuctory level C class so I would appreciate keeping things as close to my level as possible.</p>