- 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.
In line 5 I'll edit to remove the double quotes
and replace them with single quotes,
because single quotes in a string
don't need to be escaped.
Many programmers find this method easier to use.