From the course: C Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Solution: Write your own code - C Tutorial
From the course: C Essential Training
Solution: Write your own code
(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…
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.
Contents
-
-
-
Coding your first program3m 18s
-
Challenge: Write your own code1m 5s
-
Solution: Write your own code1m 34s
-
Getting into the C language2m 29s
-
Reviewing code structure2m 56s
-
Working the C development cycle3m 11s
-
Challenge: Find and fix the bugs45s
-
Solution: Find and fix the bugs1m 38s
-
Exploring the preprocessor3m 25s
-
Understanding header files and libraries3m 19s
-
Adding comments2m 39s
-
Challenge: Build the foundation1m 13s
-
Solution: Build the foundation1m 30s
-
-
-
-
-
-