1.

What is the output of this program?
#include <iostream>
#include <ctime>
#include &ltcstdlib>
using namespace std;
int main()
{
srand((unsigned)time(0));
int ran;
int L = 11, H = 100;
int R = (H - L) + 1;
for(int k = 0; k < 1; k++)
{
ran = L + int(R * rand() / (RAND_MAX + 1.0));
cout << ran << endl;
}
}

A. 100
B. 11
C. 1.0
D. Compilation Error
E. None of these
Answer» C. 1.0


Discussion

No Comment Found

Related MCQs