C++ LOOPS | C++ FOUNDATION Question 11

Last Updated :
Discuss
Comments

What will be the output of the following C++ code?

 #include <iostream>
   using namespace std;
   int main ()
   {
       int n;
       for (n = 5; n > 0; n--)
       {
           cout << n;
           if (n == 3)
               break;
       }
       return 0;
   }

543

5432

54

432

Share your thoughts in the comments