Please Help I am getting Segmentation Fault in this code : > Question---**Interseting Merge Sort 
            Input--abc//first string
>                  def//second string
                   Output-- adbecf 
                   Input 2-- abc
>                           defgh 
                   Output    adbecfgh**

I am getting segmentation fault in my code i don't know why i don't think my code points to any invalid pointer so please help me remove this code


Here is my Solution code in C

    #include <math.h>
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <assert.h>
    #include <limits.h>
    #include <stdbool.h>
    char *mergeTwo(char *a,char *b)
    {   char *c;int k=0,i=0;
       while(1)
       {
           if(a[i]!='\0' && b[i]!='\0')
           {
               if(a[i]>=b[i])
               {
                   c[k++]=b[i];
                   c[k++]=a[i];
               }
               else
               { c[k++]=a[i];
                   c[k++]=b[i];
                   
               }
           }
           else if(a[i]!='\0' && b[i]=='\0')
           {
               c[k++]=a[i];
           }
           else if(a[i]=='\0' && b[i]!='\0')
           {
               c[k++]=b[i];
           }
           else if(a[i]=='\0' && b[i]=='\0')
           {
               c[k]='\0';
               break;
           }i++;
       }
    return c;    
    }
    
    int main() {
        char str1[100],str2[100],*str3;
        gets(str1);
        gets(str2);
        str3= mergeTwo(str1,str2);
        puts(str3);
        return 0;
    }





ERROR--
IN IMAGE
[ERROR][1]


  [1]: https://i.stack.imgur.com/weGl2.png