I have been working on this quiz: https://www.sanfoundry.com/c-quiz-pointers-addresses/
and don´t understand why casting an int to a float would output 0.000000
#include <stdio.h>
int main()
{
int i = 10;
void *p = &i;
printf("%f\n", *(float*)p);
return 0;
}
Expected output: 10.000000
Actual output: 0.000000
Thank you very much for your help!