Copy one string to another using recursion

Get a input string from user and copy the string to another string.



#include <stdio.h>
#include <string.h>
#include <stdlib.h>

char* copy(char *s,char *v,int i)
{
   if(*(s+i)=='\0')
   {
   *(v+i)='\0';
     return v;
   }
   *(v+i)=*(s+i);
   copy(s,v,i+1);
}

int main(void) {
   char *s,*v;
   s=(char*)malloc(sizeof(char));
   v=(char*)malloc(sizeof(char));
   scanf("%s",s);
   v=copy(s,v,0);
   printf("%s",v);
   return 0;
}