Resources on the Web
Go check out the C/C++ PROGRAMMING EXERCISES page and do the first five questions.
You should continue to look for more options of exercises to practice your programming. Some of these resources also show solutions but try to do the exercise yourself before looking at the solution. When you do find a solution, compare your solution to those of “the answer” as well as those of your classmates.
C++ keeps changing and runs different on different machines. For the first question you may want to use printf instead of cout to format the printing, check out the printf reference here.
Note that you will also need to include <stdio.h>
printf will also complain that you are not passing an int to the %d so perhaps you want to cast the sizeof value to an int like this:
What to Do
Publish your answers on your blog post and perhaps in your repository on GitHub for the course.
Feature Image Credit
Quiz – Week 6 by admin is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.