What will be the output of following C program include main

What will be the output of following C++ program #include main() {int i; for(i = 0; i

Solution

Answer:

The output of the program is Option C i.e 0 2

Program:

#include<iostream>
#include<string>
using namespace std;
int main()
{
int i;
for(i=0;i<=3;i++)
{
   cout<<i++<<\" \";
}
}

Output:

0 2

 What will be the output of following C++ program #include main() {int i; for(i = 0; iSolutionAnswer: The output of the program is Option C i.e 0 2 Program: #in

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site