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

int slength(char s[])
{  int i;
   int l;
   l = 0;
   i =0;
   while(s[i]!='\0')
   {  l = l+1;
      i = i+1;
   }
   return l;
}

char * scopy(char s[])
{  char * c;
   int l;
   int i;
   l = slength(s);
   c = (char *)malloc(l);
   i = 0;
   while(i<l)
   {  c[i] = s[i];
      i = i+1;
   }
   return c;
}

main(int argc,char ** argv)
{  char * s;
   s = scopy("water: the drink that is wet!");
   printf("%s\n",s);
}

