From the course: C Essential Training
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Floating point types - C Tutorial
From the course: C Essential Training
Floating point types
- [Instructor] C provides the common floating point types. This is float-types.cpp from Chapter four of the Exercise Files. C provides these floating point types if we come down here line 13, we have the float type and then line on 14, we have the double type, and then on line 15, the long double type. On most modern systems, the float type is 32-bits precision to about seven digits. The double type, is 64-bits giving us a precision of about 16 digits. And the long double type, may be the same as double or it may be something larger like an IEEE long double, that may give us more precision. On many systems including this one here which is an Apple with the M1 chip, which is the ARM 64 running Apple clang, the long double type is simply a synonym for double. This is also true on Microsoft Visual C even on 64-bit systems, the long double is simply a synonym for double. On Intel® MAX® and on other Intel systems running…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Overview of data types3m 21s
-
(Locked)
Integer types2m 43s
-
(Locked)
Floating point types6m 51s
-
(Locked)
The auto type4m 2s
-
(Locked)
Qualifiers4m 33s
-
(Locked)
Type aliases2m 5s
-
(Locked)
Primitive arrays5m 23s
-
(Locked)
C-strings4m 37s
-
(Locked)
Structures2m 50s
-
(Locked)
Challenge: Library card2m 9s
-
(Locked)
Solution: Library card1m 16s
-
-
-
-
-
-
-