Thursday, 15 June 2017

c - Necessity of use (float*) before malloc

In the program of any pointer variable we often use :



float *x;
x=(float*)malloc(a*sizeof(long int));



I want to know why we use (float*) in front of malloc?

No comments:

Post a Comment