From the course: C Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Build the foundation - C Tutorial
From the course: C Essential Training
Solution: Build the foundation
(upbeat music) - I'll forgive you if you didn't quite understand the course challenge and perhaps you didn't code things the way you see here in my solution. To review the task was first, to include the stdio and stdlib header files which you see here at lines one and two. Second, create the main function. Third, in the main function put a return statement that sends zero back to the operating system. Now this program doesn't technically do anything but it was a challenge. If you got these three parts correct, then you've provided a solid foundation for the rest of the course challenges. The second part of the challenge was to add comments, which you can see in this code. So line four introduces the main function, lines seven through nine which will eventually contain all the statements that do things in the code, they show three other comments. To get and verify input, to avoid out of range values, and to…
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
-
(Locked)
Challenge: Write your own code1m 5s
-
(Locked)
Solution: Write your own code1m 34s
-
(Locked)
Getting into the C language2m 29s
-
(Locked)
Reviewing code structure2m 56s
-
(Locked)
Working the C development cycle3m 11s
-
(Locked)
Challenge: Find and fix the bugs45s
-
(Locked)
Solution: Find and fix the bugs1m 38s
-
(Locked)
Exploring the preprocessor3m 25s
-
(Locked)
Understanding header files and libraries3m 19s
-
(Locked)
Adding comments2m 39s
-
(Locked)
Challenge: Build the foundation1m 13s
-
(Locked)
Solution: Build the foundation1m 30s
-
-
-
-
-
-