Q. What is the output of the following C++ code?
Code:#include <iostream>
using namespace std;
int main()
{
int n = 5, i;
for (i = 0; i < n; i++)
{
n++;
cout << n << endl;
goto a;
}
a:
do
{
cout << "label a" << endl;
break;
}
while( 0 );
return 1;
}
β
Correct Answer: (D)
6 label a