Question
1.
#include
2.
using namespace std;
3.
int main ()
4.
{
5.
int n;
6.
for (n = 5; n > 0; n--)
7.
{
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int main ()
4.
{
5.
int n;
6.
for (n = 5; n > 0; n--)
7.
{
8.
cout
Answer: Option A
Was this answer helpful ?
Inthis program, We are printing the numbers in reverse order but by using break statement we
stopped printing on 3.
Output:
$ g++ stat.cpp
$ a.out
543
Was this answer helpful ?
Submit Solution