Table of contents

    코드

    #include <stdio.h>
    
    void my_strcpy(char *, char*);
    
    void main()
    {
    	char fruit[20];
    	my_strcpy(fruit,"Starwberry");
    	printf("%s",fruit);
    }
    
    void my_strcpy(char *str, char *des)
    {
    	while(*des != '\0')
    	{	
    		*str = *des;
    		str++;
    		des++;
    	}
    	*str = '\0';
    }