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