From the course: C Essential Training
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Integer types - C Tutorial
From the course: C Essential Training
Integer types
- [Instructor] Integer types are simple primitive data types for representing integer values. Whole numbers with no fractional part. The integer types include char, int, short int, long int, and long long int. These are all available in both signed and unsigned versions. The size of each type will vary depending upon both the architecture and the compiler. The char type is defined as the minimum necessary size to contain a character. On most modern systems it's eight bits. The char type may be signed or unsigned by default. That is, on some systems it may be signed, and on other systems it may be unsigned. You cannot count on a char being one or the other. The only thing you can count on is that will hold a character. All the other integer types are signed unless modified with the unsigned keyword. The short int type is the smallest natural size of an integer on the target processor. May be the same as int on modern…
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
-
-
-
-
-
-
-