-
What is the output of this program?
#include
using namespace std;
int main ()
{
int i;
for (i = 10; i > 0; i--)
{
cout << i<<" ";
if (i == 8)
break;
}
return 0;
}
-
- 10 0
- 0 10 8
- 10 9 8
- Compilation Error
- None of these
Correct Option: C
In this program, We are printing the numbers in reverse order but by using break statement we stopped printing on 8.