Enjoying the preview?
This is the free first lesson. Get full access — request a demo or sign in.
Enjoying the preview?
This is the free first lesson. Get full access — request a demo or sign in.
In this Variables and Constants course, we’ll cover the different data types C uses to work with numbers and text. These lessons will cover the fundamental data types for storing numbers, characters, and strings, including Int for whole numbers, Float for single-precision floating-point numbers, and Double for double-precision floating-point numbers. We’ll also explain Char, the data type C uses for individual alphabetic characters, which is stored as an integer value to make the language more efficient—C does not have a string type, but instead stores strings as arrays of characters.
These lessons also discuss why C doesn’t have a special constant for true or false values. C was designed to be an efficient programming language, and not having a dedicated Boolean type allows programs to run much more efficiently. This often causes confusion for programmers experienced with more modern languages, as these languages usually have a Boolean type for true and false values.
It covers the different data types C uses to work with numbers and text, including the fundamental data types for storing numbers, characters, and strings: Int, Float, Double, and Char. It also explains why C does not have a special constant for true or false values.
The course covers the three C numeric data types: Int for whole numbers, Float for single-precision floating-point numbers, and Double for double-precision floating-point numbers.
C uses the Char data type for individual alphabetic characters, stored as an integer value to make the language more efficient. C does not have a string type and instead stores strings as arrays of characters.
C was designed to be an efficient programming language, and not having a dedicated Boolean type for true and false values allows programs to run much more efficiently.
The lessons are: Declaring and Assigning Values to Variables; Initializing New Variables; Declaring and Using Constants; and Arithmetic Statements.