Finance[US] Career Guide Free Tutorials Go to Your University Placement Preparation 
0 like 0 dislike
277 views
in Tutorial & Interview questions by Goeduhub's Expert (9.3k points)

The C language has three mandatory real floating point types, float, double, and long double.

1 Answer

0 like 0 dislike
by Goeduhub's Expert (9.3k points)
 
Best answer

The C language has three mandatory real floating point types, float, double, and long double.

float f = 0.314f;                        /* suffix f or F denotes type float */

     double = 0.314;                 /* no suffix denotes double */

long double ld = 0.314l; /* suffix l or L denotes long double */ 

/* the different parts of a floating point definition are optional */

double x = 1.; /* valid, fractional part is optional */

double y = .1; /* valid, whole-number part is optional */ 

/* they can also defined in scientific notation */

double sd = 1.2e3; /* decimal fraction 1.2 is scaled by 10^3, that is 1200.0 */

The header <float.h> defines various limits for floating point operations.

 

Floating point arithmetic is implementation defined. However, most modern platforms (arm, x86, x86_64, MIPS) use IEEE 754 floating point operations.

C also has three optional complex floating point types that are derived from the above.

Learn & Improve In-Demand Data Skills Online in this Summer With  These High Quality Courses[Recommended by GOEDUHUB]:-

Best Data Science Online Courses[Lists] on:-

Claim your 10 Days FREE Trial for Pluralsight.

Best Data Science Courses on Datacamp
Best Data Science Courses on Coursera
Best Data Science Courses on Udemy
Best Data Science Courses on Pluralsight
Best Data Science Courses & Microdegrees on Udacity
Best Artificial Intelligence[AI] Courses on Coursera
Best Machine Learning[ML] Courses on Coursera
Best Python Programming Courses on Coursera
Best Artificial Intelligence[AI] Courses on Udemy
Best Python Programming Courses on Udemy

Related questions

0 like 0 dislike
1 answer 416 views
0 like 0 dislike
1 answer 223 views
0 like 0 dislike
1 answer 242 views

 Important Lists:

Important Lists, Exams & Cutoffs Exams after Graduation PSUs

 Goeduhub:

About Us | Contact Us || Terms & Conditions | Privacy Policy ||  Youtube Channel || Telegram Channel © goeduhub.com Social::   |  | 

 

Free Online Directory

...