In this challenge, you must determine which quantities to set as variables and which to set as constants, declare variables in the code, initialize them to specific values, and send the values to standard output. It's important that variables are declared of the proper type, assigned a value, and used in a printf() statement with the required placeholder to properly output the value.
(upbeat music) … - [Instructor] Exercise File 02_06-challenge1 … contains two printf statements. … One outputs the value of variable a. … The other outputs the value of variable b. … Yes, something is missing. … Your task is to modify the exercise file to add code … that declares variables a and b. … Variable a is an integer. … Variable b is a character constant. … Assign values to each, variable a … and constant b, your choice. … This challenge should take under five minutes to complete. … …
- Writing your first C program
- Working the C development cycle
- Adding comments to code for clarity
- C language data types
- Declaring variables
- Making new data types
- Typecasting variables
- Using math, assignment, and logical operators
- Creating for and while loops
- Nesting loops
- Creating functions
- Returning values from functions
- Passing arguments to functions
- Creating recursive functions
Skill Level Intermediate
C: Data Structures, Pointers, and File Systemswith Dan Gookin2h 57m Intermediate
1. The Fundamentals of C
2. Variables and Values
3. Operators and Math
4. Decisions and Loops
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.