From the course: Complete Guide to C Programming Foundations
Challenge: Making variables and constants - C Tutorial
From the course: Complete Guide to C Programming Foundations
Challenge: Making variables and constants
(upbeat music) - [Instructor] This exercise file contains two print F statements. One outputs the value of variable A. The other outputs the value of variable B, yet something is missing. Your task is to modify the exercise file to add code that declares variables A and B. Say that variable A is an integer, which you can see in the code by the percent D placeholder, and that variable B is a character constant, which is shown by the percent C placeholder. Remember that the placeholder matches only the variable type, not whether the variable is a constant or literal. Assign values to each item, variable A and constant B. This challenge should take under five minutes to complete.
Contents
-
-
-
-
Understanding C language data types3m 17s
-
(Locked)
Declaring variables2m 53s
-
(Locked)
Working with variables3m 4s
-
(Locked)
Exploring the printf() function3m 48s
-
(Locked)
Using constants2m 58s
-
Challenge: Making variables and constants53s
-
(Locked)
Solution: Making variables and constants1m 16s
-
(Locked)
Understanding variable scope3m 35s
-
(Locked)
Making new data types3m 25s
-
(Locked)
Specifying characters and strings3m 17s
-
(Locked)
Specifying integers and real numbers3m 55s
-
(Locked)
Typecasting a variable2m 20s
-
(Locked)
Chapter challenge: Adding variables and constants1m 10s
-
(Locked)
Chapter solution: Adding variables and constants2m 7s
-
-
-
-
-
-
-
-
-
-