Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
Zhenis Otarbay your statement is false. malloc() function returns void * (void pointer). You need to cast it to the pointer of your requirement, say char* (char pointer) You would use it as below: ptr = (cast-type*) malloc(byte-size) The formal syntax is: void *malloc(size_t size)
26th Jan 2019, 11:04 AM
Renjith M
Renjith M - avatar