Your task is to define a union that allows viewing a 32-bit floating-point value both as a float and as its raw byte representation.
The union must contain:
float fuint8_t bytes[4]The program will:
Input / Output Specification
Input
Output
Output format example:
3F 80 00 00
(Note: A trailing space after the last byte is required.)
Example 1
Input:
1.0
Output:
00 00 80 3F
Example 2
Input:
-2.5 Output:
00 00 20 C0 ⚠️ Embedded System Assumptions (Mandatory Constraints):
Input
1
Expected Output
00 00 80 3F