Am I using malloc wrong in this snippet
5064
How to find the 'sizeof' (a pointer pointing to an array)?
504
When and why will a compiler initialise memory to 0xCD, 0xDD, etc. on malloc/free/new/delete?
52302
Using sizeof with a dynamically allocated array
147050
How to avoid memory leaks when using a vector of pointers to dynamically allocated objects in C++?
58713
When is it best to use the stack instead of the heap and vice versa?
31914
Use of alloc init instead of new
82318
What is the difference between char array and char pointer in C?
12022
Memory Allocation char* and char[]
45814
Crash or "segmentation fault" when data is copied/scanned/read to an uninitialized pointer
7617
Do I cast the result of malloc?
155849
Why sizeof int is wrong, while sizeof(int) is right?
85305
How can I get the size of a memory block allocated using malloc()?
100567
Malloc inside a function call appears to be getting freed on return?
95915
Pointer to pointer clarification
102101
Improper de-allocation of memory?
61777
How to dynamically allocate memory space for a string and get that string from user?
63209
malloc an array of struct pointers