Online Courses
Free Tutorials  Go to Your University  Placement Preparation 
Goeduhub's Online Courses @ Udemy in Just INR 570/-
Online Training - Youtube Live Class Link
0 like 0 dislike
128 views
in Tutorial & Interview questions by Goeduhub's Expert (8.3k points)

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

Goeduhub's Top Online Courses @Udemy

For Indian Students- INR 360/- || For International Students- $9.99/-

S.No.

Course Name

 Coupon

1.

Tensorflow 2 & Keras:Deep Learning & Artificial Intelligence

Apply Coupon

2.

Natural Language Processing-NLP with Deep Learning in Python Apply Coupon

3.

Computer Vision OpenCV Python | YOLO| Deep Learning in Colab Apply Coupon
    More Courses

1 Answer

0 like 0 dislike
by Goeduhub's Expert (8.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.

3.3k questions

7.1k answers

394 comments

4.6k users

Related questions

0 like 0 dislike
1 answer 221 views
0 like 0 dislike
1 answer 110 views
0 like 0 dislike
1 answer 117 views

 Goeduhub:

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