Home » C++ Programming » Numbers » Question
  1. What is the output of this program?
     #include <iostream>
    #include <cstdlib>
    using namespace std;
    int main()
    {
    cout << RAND_MAX << endl;
    }
    1. Depends on the compiler
    2. Compilation Error
    3. Runtime Error
    4. Garbage value
    5. None of these
Correct Option: A

RAND_MAX is a function used by the compiler to create a maximum random number.



Your comments will be displayed only after manual approval.