-
What is the output of this program?
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int Ran = rand();
cout << Ran << endl;
}
-
- 9383
- 18042
- 1804289383
- 0 to RAND_MAX
- None of these
Correct Option: D
As the declared number is integer, It will produce the random number from 0 to RAND_MAX. The value of RAND_MAX is library-dependent, but is guaranteed to be at least 32767 on any standard library implementation.