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

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...