What will be the output of following C program include main

What will be the output of following C++ program? #include main() {in t = 0, j = 3; do {cout

Solution

The output for the above c++ program is : 3

explanation:-

varaibles intializes at i=0,j=3;

then it moves to do while loop..

prints i+j which is 3

i value incremented i=1

then it checks for condition while(j<3) here j is 3

so condition fails and loop breaks..

in the above options, none of the above contains the answer..

 What will be the output of following C++ program? #include main() {in t = 0, j = 3; do {cout SolutionThe output for the above c++ program is : 3 explanation:-

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site