31
GB
What is the output: int x=5; if(x) { int x=10; cout<
IN
आउटपुट क्या है: int x=5; यदि(x) { int x=10; अदालत
A
105
105
B
1010
1010
C
55
55
D
Compile error
संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
Inner block has its own x=10 (shadows outer). Prints 10 inside block, then outer x=5. Output: 105.
व्याख्या (हिन्दी)
आंतरिक ब्लॉक का अपना x=10 (बाहरी छाया) होता है। ब्लॉक के अंदर 10 प्रिंट करता है, फिर बाहरी x=5 प्रिंट करता है। आउटपुट: 105.