The instructor shares his solution for creating a program from scratch. Code is reviewed to cover any potential errors, explaining the various compiler feedback messages.
(upbeat music) … - [Instructor] Here you see my solution to the challenge … where I've added a second puts statement … to generate two lines of output. … The first puts statement at line five, … sends this line of text to standard output. … This is my program. … The second puts statement at line six, … generates an additional line of text. … And for the return value, I chose zero, … meaning the program completed its task properly. … Going to click the Build and Run button here, … and you see the two lines of text generated here … and the process returned zero. … I hope your solution worked as intended. … Remember, you need to output only one string of text, … two strings was the bonus challenge. … And if you did get to two solution programs right, great. … As a review, the include directive … brings in the stdio header file into the code. … The main function is at line three, … this is required for all C programs … it's where execution starts. … The functions statements … are enclosed in braces, a pair of them …
- 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.