- I'm going to create exercise blorf.c myself,…so you can compare what you've come up with…with what I did.…Be aware that your code…may not match up exactly with mine.…I'll create a new empty file in Code::Blocks,…and type in a basic skeleton.…You see as I type, the text isn't color-coded.…You have to save the file…before the editor recognizes how to color the text.…I'll save here, and then go back…and rewrite the specific printf function.…And there's the color.…
So at line 5, I'm going to type in the printf function.…"Hello", and a new line," My name is",…and escape the double quote, "Blorf", period.…Escape the double quote.…Type a semicolon to make it a statement.…Add a blank line for readability.…Save, build, and run.…There's the output as requested.…A single printf function that output two lines of text.…
And if you thought to add another new line…at the end of the string, you get bonus points.…Otherwise the output looks kind of scrunchy.…By the way, if you don't want to use double quotes,…you can use single quotes instead.…
- Understanding a C program
- Adding comments
- Using escape characters
- Working with values and placeholders
- Introducing variables
- Making a decision with if
- Adding functions
- Manipulating strings
- Building arrays
- Nesting structures
Skill Level Beginner
1. Getting Started
2. Programming Basics
3. Program Flow Control
4. Intermediate C Language Concepts
5. Advanced C Language Concepts
Next steps2m 11s
- 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.