#include <stdio.h>

#include <stdlib.h>


typedef struct a {

int n;

char *p;

} a;


int main()

{

a A;

A.p = (char *)malloc(20 * sizeof(char));


A.n = 100;

A.p = "just testing";


printf("%d\n%s\n", A.n, A.p);


free(A.p);


return 0;

}


디버깅해보니까 free(A.p) 여기가 문제인거같은데...

뭘 바꿔줘야될지 모르겠어여