If all required header files are already included, identify the possible…

NVS TGT/PGT 2022

If all required header files are already included, identify the possible output of the C++ code: class Weather { int Humidity, Temp; public: Weather(int H = 50, int T = 20) { Humidity = H; Temp = T; } void HOT(int T) { Temp += T; } void HUMID(int H) { Humidity = H; } void DISP() { cout << Humidity << " : " << Temp << endl; } }; void main() { Weather W(60); W.HOT(5); W.HUMID(65); W.DISP(); }

  1. A.

    65 : 25

  2. B.

    60 : 25

  3. C.

    60 : 20

  4. D.

    65 : 5

Attempted by 164 students.

Sign up free to check your answer

Sign up free

Explore the full course: Rssb Senior Computer Instructor

Loading lesson…