Question: Activity #1 Write a C++ program that outputs its own source code to the screen. It should do this by opening the code as a
Activity #1
Write a C++ program that outputs its own source code to the screen. It should do this by opening the code as a file, and outputting all of its contents.
Activity #2
For this activity you will need to modify your program so it is able to count all the opening and closing parentheses ( ), braces { }, and brackets [ ] inside itself by reading all the contents using
Your program must print the total number of all the parentheses, braces, and brackets. Below is the expected output:
Number of (: 5 Number of ): 5 Number of {: 11 Number of }: 11 Number of [: 2 Number of ]: 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
