Saving a float value in a uint8_t variable using memcpy in C

后端 未结 0 1060
孤独总比滥情好
孤独总比滥情好 2020-12-06 12:04

I have the following code:

float fNum1 = 3333333; // a number greater than 255
uint8_t uNum1 = 0;
memcpy(&uNum1, &fNum1, sizeof(fNum1)); // Questions          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题