how to use malloc in c

C
int* a =(int*)malloc(sizeof(int))ptr = (cast-type*) malloc(byte-size)ptr = (castType*) malloc(size);
Source

Also in C: