strlen1 [C 언어] strlen 함수 정의 strlen - calculate the length of a string. string 의 길이를 계산한다. 시놉시스 #include #include int strlen(string s) 리턴 value this function returns the number of characters in s, excluding the terminating NUL byte (i.e., '\0'). 예시 #include #include #include int main(void) { string s = get_string("Input: "); printf("Output: "); for (int i = 0, n = strlen(s); i < n; i++) { printf("%c", s[i]); } printf("\n.. 2022. 2. 28. 이전 1 다음