Freeing strings in C

前端 未结 6 1519
忘掉有多难
忘掉有多难 2021-02-03 11:26

If I would write:

char *a=malloc(sizeof(char)*4);
a=\"abc\";
char *b=\"abc\";

do I need to free this memory, or is it done by my system?

6条回答
提交回复
热议问题