Code intended to "zip" two strings together.
(Some input cases are not defined in this code.)
What are bugs in the code?. How to fix bugs?.
Code:char *zip(char *a, char *b) { char *result; int len, i; len = strlen(a); result = malloc(2*len); for(i = 0; i <= len; i++) { result[2*i] = a[i]; result[2*i+1] = b[i]; } return result; }