The instructor shares the solution, reviewing the errors and warnings one at a time. It's important to note that the message may indicate an improper line number for the errors, which makes catching them difficult.
(lively music) … - [Instructor] I'm going to work through this challenge … to show you how I arrived at the solution. … Behold the code with two bugs. … To find the first, I'm just going to build, … not build and run, just build. … And the bugs appear, shown here in the Build messages tab. … The second one is really just a warning, … but the first bug causes the second … to be interpreted improperly. … First things first. … The missing terminator character at line 7. … A string literal needs a second double quote, … and this is where color-coding the text plays a good role … in helping you write code. … Add the double quote. … See how the colors change? … Save, and build again. … And now we're down to one error. … The second error presents itself properly, … displaying line 13 is missing a semicolon, … which might be before or after line 13. … The compiler isn't really accurate. … But here it is. … Add the semicolon right there … at the end of the break keyword. … Save the change. … Build. …
- 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.