361
GB
What is the output: class A{int x=5; public: void print()const{cout<
IN
आउटपुट क्या है: class A{int x=5; सार्वजनिक: शून्य प्रिंट() स्थिरांक {cout
A
5
5
B
10
10
C
Compile error
संकलन त्रुटि
D
Undefined
अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
const object can call const member functions. print() outputs x=5. Output: 5.
व्याख्या (हिन्दी)
कॉन्स्ट ऑब्जेक्ट कॉन्स्ट सदस्य फ़ंक्शंस को कॉल कर सकता है। प्रिंट() आउटपुट x=5। आउटपुट: 5.