asked
Learning data structures and various examples in C
C language basic grammar review - arrays, pointers, strings, dynamic memory allocation
Written on
·
385
1
메모리 동적 할당에서 메모리공간을 확장시킬 때,
50분쯤에 있는 코드에는 원래 array에 할당되어있던 메모리 공간이 쓰레기값이 되어버리는 하자가 있다고 하셨는데요.
그렇다면 저 코드 대신에 realloc을 사용하는 방법이 있는 걸로 알고있는데요! realloc을 쓰면 안좋은 점이라도 있는건가요?
Answer