1.

What is the output of this program?
 #include <cstdlib>
#include <ctime>
#include <iostream>
using namespace std;
int main()
{
srand((unsigned)time(0));
int num;
for (int k = 0; k < 2; k++)
{
num = (rand() % 10) + 1;
cout << num;
}
}

A. 2
B. 20
C. 10
D. Any two number from 1 to 20
E. Compilation Error
Answer» E. Compilation Error


Discussion

No Comment Found

Related MCQs