how to use malloc in c
snippet in c

how to use malloc in c

user2164

int* a =(int*)malloc(sizeof(int))

C malloc

user5516

ptr = (cast-type*)calloc(n, element-size);

how to use malloc in c

user1979

ptr = (cast-type*) malloc(byte-size)

how to use malloc in c

user9046

ptr = (castType*) malloc(size);