C언어 strdup()

(C strdup()에서 넘어옴)

1 개요[ | ]

C strdup()
  • "string duplicate → 문자열 복제"
#include <stdio.h>
#include <string.h>
int main() {
    const char *s1 = "Hello";
    char *s2 = strdup(s1);
    printf(s2);
    // Hello
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}