Wednesday, 14 November 2018

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

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...