일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- #3차원배열
- #성적관리프로그램
- docker example
- #다차원포인터
- #CallByAddress
- #bubbleSort
- git flow
- border-box
- html charset
- html id
- hyperledger transaction
- relative path
- #1차원배열
- mac terminal command
- html object
- #binary
- #C++ 연산자함수오버로딩
- #2차원배열
- html youtube
- 하이퍼레저패브릭
- html code
- html multimedia
- html5 new tag
- 토큰경제
- #android activity
- #C++ has~a
- html video
- #JAVASCRIPT
- #자바상속#자바이즈어#is~a
- html plug-in
Archives
- Today
- Total
목록#strdup (1)
A sentimental robot
strdup함수 만들기
#include #include #include char * my_strdup(char *s) { int n; char *p; n = strlen(s)+1; // includes null character p = (char*)malloc(n); strcpy(p,s); return p; } void main() { char *p; p = my_strdup("HELLO"); printf("%s\n", p); free(p); p = my_strdup("Hi"); printf("%s\n", p); } #include #include #include void my_strdup(char **t, char *s) { int n; char *p; n = strlen(s)+1; p = (char *)malloc(n)..
C
2018. 1. 3. 09:22