#include <stdio.h>
#include <stdlib.h>

char * Maxlen(void)
{
    char * sentence;
    int length;

    fputs("문장의 최대 길이는? ", stdout);
    scanf("%d", &length);

    sentence = (char *) malloc(length);

    return sentence;
}

int main(void)
{
    char * sentence;

    sentence = Maxlen();

    printf("문장입력: ");
    scanf("%s", sentence);

    printf("%s \n", sentence);

    return 0;
}


=======================


왜 그림에서 4바이트 힙 영역을 만들었는데

거기에 fuckyou를 넣어도 저장해도 (이게 안될텐데) 나중에 출력이 가능한지 너무너무 궁금함

도와줘요 프갤러~