Question: WRITE THE FOLLOWING IN C (NOT C++ OR JAVA) 1o.9 (Using Unions) Create union floatingPoint with members float f, double d and long double x.

WRITE THE FOLLOWING IN C (NOT C++ OR JAVA)

WRITE THE FOLLOWING IN C (NOT C++ OR JAVA) 1o.9 (Using Unions)

1o.9 (Using Unions) Create union floatingPoint with members float f, double d and long double x. Write a program that inputs values of rype float, double and long double and stores the float, a double and a long double. Do the values always print correctly? Note: The long double result will vary depending on the system (Windows, Linux, MAC) you use. So values in union variables of type union floatingPoint. Each union variable should be printed as a do not be concern if you are not getting the correct answer. Input must be same for all cases for comparison. Enter data for type float:234.567 Breakdown of the element in the union float 234.567001 double 0.00000O long double 0.GOOOO0 Breakdown in float e0000000 double 436a9127 long double 22fde0 hex Enter data for type double :234.567 Breakdown of the element in the union float -788598326743269380.G0G00O double 234.5670G0 long double 0.GOOOO0 Breakdown in hex float 0 double dd2f1aa0 long double 22fde0 Enter data for type long double

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!