记录

1. 16进制转float


1 #include <stdio.h>
2
3 int main()
4 {
5 unsigned int dat= 0xbed96b3a;
6 float f=(*(float *)&dat);
7 printf("Hello world! ");
8
9 printf("data %f ", f);
10 return 0;
11 }

$ gcc hello.c
$ ./a.out
Hello world!
data -0.424646

原文地址:https://www.cnblogs.com/wi100sh/p/4773190.html