| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> int main(void) { char *pc; pc = (char *)malloc(1 * sizeof(char)); if (pc == NULL) { printf("¸Þ¸ð¸® ÇÒ´ç ¿À·ù\n"); exit(1); } *pc = 'a'; printf("%c \n", *pc); free(pc); return 0; } | cs |


http://itsys.hansung.ac.kr/cgi-bin/onlineTest/viewCcoding/onlineCcoding.cgi?source=src/chap13/malloc1.c
CÇÁ·Î±×·¡¹Ö(ÇÁ·Î±×·¡¹Ö¾ð¾î) ½Ç½À°Ô½ÃÆÇ