Memory Allocation char* and char[]

前端 未结 3 520
天命终不由人
天命终不由人 2020-11-28 06:42

What is the difference between these two in terms of memory allocation.

char *p1 = \"hello\"; 
char p2[] = \"hello\";
3条回答
提交回复
热议问题