The instructor reviews the solution for the challenge, explaining each step of the I/O process and how the parts work. Understanding basic input and output and the processing between is a fundamental concept of all computer programming.
(upbeat music) … - [Instructor] Here is my solution which builds upon … my solution from the previous chapter. … You can see the comments are all in place … but some new statements have been added. … Line seven declares integer variable rows, … I hope you didn't forget this step. … Input must be stored somewhere. … Line 10 has a printf statement … outputting the user prompt, … How many rows (18 max)? … No new line is added here, … this is because users expect … this type of prompt on a text screen. … Next comes this scanf statement, … it uses %d as the placeholder … for a decimal integer value … and then &rows is prefixed by an ampersand. … This is how the scan function works … and how it's been configured for integer input … in various movies in this chapter. … After the variable is input and assigned a value, … the printf statement at line 15 outputs the value. … Build and run. … And let's see we want 15 rows. … The computer will dutifully process 15 rows. … It's okay if you got the phrasing different …
- 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.