What will be the output of following C include main int x 5

What will be the output of following C++ #include main() {int x = 5; while (x>0) {cout

Solution

#include <iostream>

using namespace std;

int main()
{
   //cout << \"Hello World\" << endl;

   int x= 5;

   while(x>0)
   {
     
       cout<< x << \" \" << endl;

     
   }

   return 0;
}

answer is infinite loop type 5 as infinite number

 What will be the output of following C++ #include main() {int x = 5; while (x>0) {coutSolution#include <iostream> using namespace std; int main() { //

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site