Table of contents

    코드

    #include <stdio.h>
    
    void my_strlen(char *);
    
    void main()
    {
    	char fruit[20] = "Starwberry";
    	my_strlen(fruit);
    	printf("%s\n",fruit);
    }
    
    void my_strlen(char *des)
    {
    	int count=0;
    
    	while(*des != '\0')
    	{	
    		count++;
    		des++;
    	}
    	
    	printf("%d글자입니다",count);
    }