From the course: Complete Guide to C Programming Foundations
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Chapter solution: Building the foundation - C Tutorial
From the course: Complete Guide to C Programming Foundations
Chapter solution: Building the foundation
(bright music) - [Instructor] Here's how I converted this text file into a C source code file, a program though at this point, a program really doesn't do much. First include the standard IO and standard lib header files. These header files aren't needed in the final program, but they will be eventually, and they're considered part of the basic C language source code skeleton. So the first line of text to convert introduces the main function. I'm going to make it a comment. I like the traditional C comment style shown here, though you could easily write these using the newer slash slash style of comments. Now for the main function and convert the rest of the sentences into comments. The main function needs a return statement and a closing brace, and that's it. This program does run, but as you can see here, it has no output. I start all my big projects the same way, and someday you will as well. Remember, comments can be notes to your future self. Always write them down even when you…
Contents
-
-
-
Coding your first program3m 40s
-
(Locked)
Challenge: Write your own code51s
-
(Locked)
Solution: Write your own code1m 50s
-
(Locked)
Getting into the C language2m 34s
-
(Locked)
Reviewing code structure3m 52s
-
(Locked)
Working the C development cycle3m 45s
-
(Locked)
Challenge: Find and fix the bugs43s
-
(Locked)
Solution: Find and fix the bugs1m 28s
-
(Locked)
Exploring the preprocessor3m 23s
-
(Locked)
Understanding header files and libraries3m 19s
-
(Locked)
Adding comments2m 49s
-
(Locked)
Chapter challenge: Building the foundation1m 11s
-
(Locked)
Chapter solution: Building the foundation1m 38s
-
-
-
-
-
-
-
-
-
-
-