(C언어) strnset: 문자열을
#포함하다char *strnset(char *s, int ch, size_t n); strnset 함수는 지정된 길이 n의 문자 수로 문자열을 초기화합니다. 문자열의 문자를 특정 문자로 초기화합니다. Visual Studio에서는 strnset 함수 대신 _strnset 함수를 사용해야 합니다. #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> int main() { char s()= “Initializes characters of a string to a given character.”; _strnset(s, ‘x’, strlen(s)); printf(“%s\n”, s); return 0; … Read more