Q. What is the output of the following C++ code?
Code:
#include <iostream>
using namespace std;
int main()
{
int x = 10;
if (x < 10) {
for (i = 0; i < 10; i++)
cout << i;
}
else {
cout << i;
}
return 0;
}
β
Correct Answer: (A)
Compilation error