Question: 4 - There is an error in the following C + + code: int counter = 0 ; do 1 counter + + ; while

4- There is an error in the following C++ code:
int counter =0;
do 1
counter ++ ;
while (counter 5)
What is the type of this error? Choose the correct answer.
a. syntax
b. logical
How to fix this error? Choose the correct answer.
a. add a semicolon ";" after do
b. use a for loop instead of a do-while loop
c. add a semicolon ";" after the while condition
 4- There is an error in the following C++ code: int

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!