Quiz: Say “Hello!”
Test your understanding of basic C++ structure and output.
We'll cover the following...
In the last lesson, you wrote and ran your very first C++ program. You learned how to use cout
to print text, how the basic structure of a C++ program looks, and what each line in a simple program does.
Let’s take a quick quiz to lock in those basics before we move on.
What does return 0;
indicate in the main()
function?
The program contains no errors.
The program printed something.
The program ended successfully.
The program has no output.
Nice work! You’ve just reinforced your understanding of how a C++ program looks and how output works.
Every great coder starts with the basics—and you’ve got that down.
Now it’s time to shift from theory to practice. In the next lesson, we’ll dive into a small project where you’ll apply what you’ve learned by writing and tweaking your own C++ program.
Let’s build something simple and make it yours!