From the course: Debugging C Code
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Reviewing ten common coding problems - C Tutorial
From the course: Debugging C Code
Reviewing ten common coding problems
- [Instructor] Here are 10 common C language coding problems, things you can debug just by recognizing that they exist. Matching braces and parentheses. Braces and parentheses are easy to misplace, especially when editing functions or nested statements. The problem with these goofs is that the errors and warnings generated don't always point to the incidence location. Instead rely upon color coding and matching in the editor to help you fix the problem. Missing semicolons. Semicolons dwell at the end of a statement. If you're switching between C and a language like Python, this issue crops up all the time and of course, sometimes you forget the semicolon, it happens. Misplaced semicolons. Continuing from the preceding item, the if, while, and for keywords must have its semicolon properly placed or you get code that compiles but doesn't run properly. The clang compiler is excellent at catching this error. It…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.