Sorry to ask this but I have searched for this small thing and found somthing related on this below link but was unable get any idea
How to store a float value suppose 0.00895 to an unsigned char which is later used to store in the memory buffer.
And later I need to read the array back and want to read it back from the memory.
Thanks
You don’t need
memcpyfor this… That would be useful if you were copying a float array into a buffer elsewhere in memory. All you really need is to use a different pointer type to look into the character array.If all you wanted was to stick a single float into the start of the buffer, either of the following two lines is okay:
All it’s really doing is letting you see the buffer as an array of floats.