1.

What is the output of this program?
#include 
using namespace std;
void Output()
{
static int p = 1;
int k;
for(k=p; k<=3; k++)
{
p++;
cout << p;
}
}
int main()
{
Output();
Output();
Output();
return 0;
}

A. 0123
B. 123
C. 234
D. 012345
E. 01234
Answer» D. 012345


Discussion

No Comment Found

Related MCQs