1231
GB
What is the output: int x=1; switch(x){default: cout<<'D'; case 1: cout<<'A'; break; case 2: cout<<'B';}
IN
आउटपुट क्या है: int x=1; स्विच(x){डिफ़ॉल्ट: कॉउट
A
DA
डीए
B
A
ए
C
D
डी
D
Compile error
संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
x=1 matches case 1 (cases checked in order but match is by value): A then break. Output: A.
व्याख्या (हिन्दी)
x=1 केस 1 से मेल खाता है (मामलों को क्रम में जांचा गया है लेकिन मिलान मूल्य के अनुसार है): ए फिर ब्रेक। आउटपुट: ए.