int main() {
char s1[50] = { '\0', };
char s2[50] = { '\0', };
printf("입력하고자 하는 첫번째 문자열>>");
scanf("%[^\n]s", s1);
getchar();
printf("입력하고자 하는 두번째 문자열>>");
scanf(" %[^\n]s", s2);
my_strlen(s1);
return 0;
}
int my_strlen(char *s1) {
int temp=0;
while (s1[temp] != '\0')
temp++;
printf("%d", temp);
}
이렇게 짰는데 s1에 HI 입력하면 값이 6이나와요..;;
아시발 머야 해결됨 ㅋㅋ ㅅㅂ