The instructor reviews the items that needed improvement in the course project, discussing how each one works and why it's important in the big picture. Alternative solutions are discussed with explanations of why they work or not.
(upbeat music) … - [Instructor] The first part of the challenge … and your solution is to fulfill the request … of the comment at line 12. … Avoid out of range values. … The solution is at line 13. … It's the value of variable rows … which was input is greater than 18, line 14 resets … the value of variable rows to 18. … This limits input ensuring … that the value will always be 18 or less. … Next comes the binary math. … To accomplish the binary math, … I added variable a declared up here at line seven. … The first step was to have the number of rows. … This is accomplished by the bit shift operator here … that shifts the bits, right one space. … The result is stored in variable a … which has half the value of variable rows … and its output here at line 19. … Line 20 does pretty much the opposite doubling … the value using the left shift operator, … one bit position which doubles … the value stored in variable a, … output at line 21. … Let's build and run to see the results. … And I'm going to be good and I'm going to type 10. …
- 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.