Home » C++ Programming » Data Types » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    enum channel {hotstar, zeetv, max};
    enum symbol {anamol, hotstar};
    int k = 0;
    for (k = hotstar; k <= zeetv; k++) {
    cout << k;
    }
    return 0;
    }
    1. Compilation Error
    2. Runtime Error
    3. Garbage Value
    4. hotstar
    5. None of these
Correct Option: A

In function 'int main()':
6:30: error: redeclaration of 'hotstar'
5:23: note: previous declaration 'main()::channel hotstar'



Your comments will be displayed only after manual approval.