OOP Using C++ — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye

📚 1915 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
1915 questions
1216
EN + हिं
GB What is the output: int x=5; cout<
IN आउटपुट क्या है: int x=5; अदालत
A
4 4
B
5 5
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) min=4. Output: 4.
व्याख्या (हिन्दी) मिनट=4. आउटपुट: 4.
1217
EN + हिं
GB What is the output: int x=5; cout<<(x%10)<<(x/10);
IN आउटपुट क्या है: int x=5; अदालत
A
50 50
B
05 05
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 5%10=5; 5/10=0. Output: 50.
व्याख्या (हिन्दी) 5%10=5; 5/10=0. आउटपुट: 50.
1218
EN + हिं
GB What is the output: int x=5; cout<
IN आउटपुट क्या है: int x=5; अदालत
A
10 10
B
15 15
D
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) x*3=15; clamp(15,0,10)=10. Output: 10.
व्याख्या (हिन्दी) x*3=15; क्लैंप(15,0,10)=10. आउटपुट: 10.
1219
EN + हिं
GB What is the output: int x=5; cout<<(x&0)==0;
IN आउटपुट क्या है: int x=5; अदालत
A
1 1
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) x&0=0; 0==0=1. Output: 1.
व्याख्या (हिन्दी) x&0=0; 0==0=1. आउटपुट: 1.
1220
EN + हिं
GB What is the output: int x=5; cout<<(x|0x80000000u);
IN आउटपुट क्या है: int x=5; अदालत
A
2147483653 2147483653
B
-2147483643 -2147483643
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 0x80000000 as int is INT_MIN. 5|INT_MIN= negative. As signed: -2147483643. Output: -2147483643.
व्याख्या (हिन्दी) 0x80000000 int के रूप में INT_MIN है। 5|INT_MIN= negative. As signed: -2147483643. Output: -2147483643.
1221
EN + हिं
GB What is the output: int x=5; cout<<(bool)(x&(x+1));
IN आउटपुट क्या है: int x=5; अदालत
A
1 1
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 5=101; 6=110; 101&110=100=4!=0=true=1. Output: 1.
व्याख्या (हिन्दी) 5=101; 6=110; 101&110=100=4!=0=सत्य=1. आउटपुट: 1.
1222
EN + हिं
GB What is the output: for(int i=0;i<5;i++) {if(i%2==0)continue; if(i>3)break; cout<
IN आउटपुट क्या है: for(int i=0;i3)break; अदालत
A
13 13
B
135 135
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) i=1:print;i=3:print;i=4 even skip; i=4... wait: i=4 even,continue;i=5>5 stop. Hmm: i=0:even,skip;i=1:odd,1>3 false:print 1;i=2:even,skip;i=3:odd,3>3 false:print 3;i=4:even,skip;i=5:loop ends. Output: 13.
व्याख्या (हिन्दी) i=1:print;i=3:print;i=4 यहां तक ​​कि छोड़ें; i=4... रुकें: i=4 सम,जारी रखें;i=5>5 रुकें। हम्म: i=0:सम,छोड़ें;i=1:विषम,1>3 असत्य:प्रिंट 1;i=2:सम,छोड़ें;i=3:विषम,3>3 असत्य:प्रिंट 3;i=4:सम,छोड़ें;i=5:लूप समाप्त होता है। आउटपुट: 13.
1223
EN + हिं
GB What is the output: int x=5; switch(x){case 5: cout<
IN आउटपुट क्या है: int x=5; स्विच(x){केस 5: कॉउट
A
50 50
B
5 5
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) case 5: print 5, x=0, fallthrough; case 0: print 0, break. Output: 50.
व्याख्या (हिन्दी) केस 5: प्रिंट 5, x=0, फॉलथ्रू; केस 0: प्रिंट 0, ब्रेक। आउटपुट: 50.
1224
EN + हिं
GB What is the output: for(int i=0;i<3;i++) {for(int j=0;j<3;j++) {cout<
IN आउटपुट क्या है: for(int i=0;i
A
0 0 0 1 0 0 0 1
B
Compile error संकलन त्रुटि
C
Undefined अपरिभाषित
D
0 0 0 0
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) i=0:0 0 0;i=1:0 1 then i==j==1: goto done. Output: 0 0 0 0 1.
व्याख्या (हिन्दी) i=0:0 0 0;i=1:0 1 फिर i==j==1: हो गया। आउटपुट: 0 0 0 0 1.
1225
EN + हिं
GB What is the output: for(int i=0;i<5;i++) cout<<(i&1?i*i:0);
IN आउटपुट क्या है: for(int i=0;i
A
01094 01094
B
0 1 0 9 0 0 1 0 9 0
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) i=0:0,i=1:1,i=2:0,i=3:9,i=4:0. Output: 01090.
व्याख्या (हिन्दी) i=0:0,i=1:1,i=2:0,i=3:9,i=4:0. आउटपुट: 01090.
1226
EN + हिं
GB What is the output: int a=1,b=2; if(a>0&&(b=5)>0) cout<
IN आउटपुट क्या है: int a=1,b=2; if(a>0&&(b=5)>0) cout
A
5 5
B
2 2
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) a>0=true; evaluate (b=5)>0=true; b=5. Output: 5.
व्याख्या (हिन्दी) a>0=सत्य; मूल्यांकन करें (b=5)>0=सत्य; बी=5. आउटपुट: 5.
1227
EN + हिं
GB What is the output: for(int i=2;i<10;i++) if(i%2==0&&i%3==0&&i%5==0) cout<
IN आउटपुट क्या है: for(int i=2;i
A
Nothing कुछ नहीं
B
6 6
C
30 30
D
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) LCM(2,3,5)=30>10. No such i. Output: (nothing).
व्याख्या (हिन्दी) एलसीएम(2,3,5)=30>10. ऐसा कोई नहीं I आउटपुट: (कुछ नहीं)।
1228
EN + हिं
GB 'What is the output: int x=5; if(x>0){x (1, 6, 74, 4, 4, 'What is the output: int n=0; for(int i=1;i*i<=25;i++) n++; cout<
IN 'आउटपुट क्या है: int x=5; यदि(x>0){x (1, 6, 74, 4, 4, 'आउटपुट क्या है: int n=0; for(int i=1;i*i
A
3 3
B
5: 1 5:1
C
9 9
D
25<=25. i=6: 36>25. n=5. Output: 5.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: for(int i=0;i<3;i++) {int j=0; while(j<3) {cout<<i+j; j+=2;}}', 'i+j where j=0 2525. एन=5. आउटपुट: 5.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'आउटपुट क्या है: for(int i=0;i
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) j=2:2+2=4. Output: 021324.', 'See explanation.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: int x=1; switch(x){default: cout<<\'D\'; case 1: cout<<\'A\'; break; case 2: cout<<\'B\';}'
व्याख्या (हिन्दी) जे=2:2+2=4. आउटपुट: 021324.', 'स्पष्टीकरण देखें।', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'आउटपुट क्या है: int x=1; स्विच(x){डिफ़ॉल्ट: cout
1229
EN + हिं
GB What is the output: int n=0; for(int i=1;i*i<=25;i++) n++; cout<
IN आउटपुट क्या है: int n=0; for(int i=1;i*i
A
5 5
B
6 6
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) i=1,2,3,4,5: 1,4,9,16,25<=25. i=6: 36>25. n=5. Output: 5.
व्याख्या (हिन्दी) मैं=1,2,3,4,5: 1,4,9,16,2525। एन=5. आउटपुट: 5.
1230
EN + हिं
GB What is the output: for(int i=0;i<3;i++) {int j=0; while(j<3) {cout<
IN आउटपुट क्या है: for(int i=0;i
A
0 2 1 3 2 4 0 2 1 3 2 4
B
036 036
C
Compile error संकलन त्रुटि
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) See explanation.
व्याख्या (हिन्दी) स्पष्टीकरण देखें.
1216–1230 of 1915