< Back
Page 8 of 8
This chapter is from the book
Workshop
The Workshop provides quiz questions to help you solidify your understanding of the material covered and exercises to provide you with experience in using what you’ve learned. Try to answer the quiz and exercise questions before checking the answers in Appendix D, and be certain you understand the answers before continuing to the next lesson.
Quiz
1. What is the problem in declaring Int main()?
2. Can comments be longer than one line?
Exercises
- BUG BUSTERS: Enter this program and compile it. Why does it fail? How can you fix it?
1: #include <iostream> 2: void main() 3: { 4: std::Cout << Is there a bug here?"; 5: }
- Fix the bug in Exercise 1 and recompile, link, and run it.
- Modify Listing 2.4 to demonstrate subtraction (using –) and multiplication (using *).
< Back
Page 8 of 8