I'm trying to fill byte/char array with memory address of float variable (array length is 4 bytes = pointer), but whatever I do it keeps getting float value instead of address:
float f = 20.0f;
memcpy(data, &f, sizeof(data));
Debugging it with:
printf("Array: %#X, %#X, %#X, %#X", data[0], data[1], data[2], data[3]);
...gives float value (20.0) in hex format:
Array: 0, 0, 0XA0, 0X41
What I need is memory address of float. I tried casting/dereferencing it in some different ways, but can't get it to work...