1 Question 1 EN + हिं GB What is the output: for(int i=0;i<5;i++) if(i==3) continue; cout< IN आउटपुट क्या है: for(int i=0;i A 01245 01245 B 01234 01234 C Compile error संकलन त्रुटि D 0124 0124 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) i is declared inside for; it's not accessible after the loop. Compile error. व्याख्या (हिन्दी) i के लिए अंदर घोषित किया गया है; यह लूप के बाद पहुंच योग्य नहीं है। संकलन त्रुटि. 🎯 Exam Perspective OOP Using C++ ("Control Statements" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: switch(2.5){ case 2: cout What does 'goto' do in C++? What is the output: int i=0; do{ cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
2 Question 2 EN + हिं GB What is the output: int x=10; switch(x){case 10: cout<<'A'; case 20: cout<<'B'; default: cout<<'C';} IN आउटपुट क्या है: int x=10; स्विच(x){केस 10: कॉउट A A ए B ABC एबीसी C AB अब D AC ए.सी ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Without break statements, execution falls through all subsequent cases after matching case 10. Output: ABC. व्याख्या (हिन्दी) ब्रेक स्टेटमेंट के बिना, केस 10 के मिलान के बाद सभी बाद के मामलों में निष्पादन गिर जाता है। आउटपुट: एबीसी। 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int i=5; for(i=0; i What is the output: for(int i=0;i What is the output: for(int i=1; i 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
3 Question 3 EN + हिं GB What does 'goto' do in C++? IN C++ में 'goto' क्या करता है? A Jumps to a labeled statement एक लेबल किए गए कथन पर चला जाता है B Is removed in C++11 C++11 में हटा दिया गया है C Only works inside loops केवल लूप के अंदर काम करता है D Causes undefined behavior अपरिभाषित व्यवहार का कारण बनता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) goto transfers control to a named label within the same function. It is legal but considered poor style. व्याख्या (हिन्दी) goto transfers control to a named label within the same function. यह कानूनी है लेकिन ख़राब शैली मानी जाती है। 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो OOP Using C++ ("Control Statements" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What happens when break is used inside a nested loop? What is the output: for(int i=0;i What is a 'range-based for loop' iteration over a raw a... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
4 Question 4 EN + हिं GB What is the output: int i=0; do{ cout< IN आउटपुट क्या है: int i=0; करो {मुफ़्त करो A Nothing कुछ नहीं C 01 01 D Infinite loop अनंत लूप ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) do-while executes body at least once. Prints i=0, then i becomes 1, condition 1<0 is false, loop exits. व्याख्या (हिन्दी) डू-व्हाइल बॉडी को कम से कम एक बार निष्पादित करता है। i=0 प्रिंट करता है, फिर i 1 हो जाता है, शर्त 1 🎯 Exam Perspective OOP Using C++ ("Control Statements" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: for(int i=0;i What is a 'range-based for loop' iteration over a raw a... What is the output: int i=5; for(i=0; i 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
5 Question 5 EN + हिं GB What is the output: for(;;) { static int x=0; cout<2) break; } IN आउटपुट क्या है: for(;;) {static int x=0; अदालत A 012 012 C 123 123 D Infinite loop अनंत लूप ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Static x persists; loop: print 0, x=1; print 1, x=2; print 2, x=3, 3>2 break. Output: 012. व्याख्या (हिन्दी) स्थैतिक x कायम रहता है; लूप: प्रिंट 0, x=1; प्रिंट 1, x=2; प्रिंट 2, x=3, 3>2 ब्रेक। आउटपुट: 012. 🎯 Exam Perspective यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: for(int i=0;i What is the output: int x=10; switch(x){case 10: cout What is the output: int x=5; if(x>3) if(x>4) cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
6 Question 6 EN + हिं GB What is the output: int x=5; if(x>3) if(x>4) cout<<'A'; else cout<<'B'; IN आउटपुट क्या है: int x=5; if(x>3) if(x>4) cout A A ए B B बी C AB अब D Nothing कुछ नहीं ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Dangling else: else binds to nearest if. x>4 is true so 'A' is printed. व्याख्या (हिन्दी) डैंगलिंग अन्य: अन्यथा निकटतम यदि से जुड़ता है। x>4 सत्य है इसलिए 'ए' मुद्रित है। 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: int i=0; do{ cout What is the output: for(int i=0;i What does 'fallthrough' attribute do in C++17? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
7 Question 7 EN + हिं GB What is the output: for(int i=0;i<3;i++) for(int j=0;j<3;j++) if(i==j) goto done; done: cout<<'X'; IN आउटपुट क्या है: for(int i=0;i A X एक्स B XXX XXX C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) When i==0 and j==0, goto jumps to done label, printing X once. व्याख्या (हिन्दी) जब i==0 और j==0, गोटो पूर्ण लेबल पर चला जाता है, X को एक बार प्रिंट करता है। 🎯 Exam Perspective OOP Using C++ ("Control Statements" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What happens when break is used inside a nested loop? What is the output: int x=5; if(x>3) if(x>4) cout What is the output: for(;;) { static int x=0; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
8 Question 8 EN + हिं GB What is a 'range-based for loop' iteration over a raw array? IN कच्चे सरणी पर 'लूप के लिए रेंज-आधारित' पुनरावृत्ति क्या है? A Iterates by pointer सूचक द्वारा पुनरावृत्त करता है B Iterates over each element प्रत्येक तत्व पर पुनरावृति करता है C Compile error संकलन त्रुटि D Only works with std containers केवल एसटीडी कंटेनरों के साथ काम करता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Range-based for works on raw arrays as it knows their size at compile time: for(auto x: arr). व्याख्या (हिन्दी) कच्चे सरणियों पर कार्यों के लिए रेंज-आधारित क्योंकि यह संकलन समय पर उनके आकार को जानता है: for(auto x: arr)। 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int x=5; while(x (1, 6, 74, 4, 4, '... What is the output: for(int i=0;i What does 'goto' do in C++? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
9 Question 9 EN + हिं GB What is the output: int x=5; while(x (1, 6, 74, 4, 4, 'What happens when break is used inside a nested loop?', 'What happens when break is used inside a nested loop?', 'Breaks out of all loops', 'Breaks out of innermost loop only', 'Compile error', 'Compile error', 'Undefined behavior', 'undefined behavior', NULL, 'option_b', 'break only exits the immediately enclosing loop or switch; not outer loops.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: switch(2.5){ case 2: cout IN What is the output: int x=5; while(x (1, 6, 74, 4, 4, 'What happens when break is used inside a nested loop?', 'Nested loop के अंदर break use करने पर क्या होता है?', 'Breaks out of all loops', 'सभी loops से बाहर निकलता है', 'Breaks out of innermost loop only', 'केवल innermost loop से बाहर निकलता है', 'Compile error', 'Compile error', 'Undefined behavior', 'undefined behavior', NULL, 'option_b', 'break only exits the immediately enclosing loop or switch; not outer loops.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: switch(2.5){ case 2: cout<<'A'; break; default: cout<<'B'; } A A ए B B बी C Compile error संकलन त्रुटि D AB अब ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Switch condition must be integer type; double is not allowed. Compile error. व्याख्या (हिन्दी) स्विच की स्थिति पूर्णांक प्रकार की होनी चाहिए; डबल की अनुमति नहीं है. संकलन त्रुटि. 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो OOP Using C++ ("Control Statements" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What does 'fallthrough' attribute do in C++17? What is a 'range-based for loop' iteration over a raw a... What is the output: for(;;) { static int x=0; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
10 Question 10 EN + हिं GB What happens when break is used inside a nested loop? IN क्या होता है जब नेस्टेड लूप के अंदर ब्रेक का उपयोग किया जाता है? A Breaks out of all loops सभी पाशों से टूट जाता है B Breaks out of innermost loop only अंतरतम पाश से ही टूटता है C Compile error संकलन त्रुटि D Undefined behavior अपरिभाषित व्यवहार ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) break only exits the immediately enclosing loop or switch; not outer loops. व्याख्या (हिन्दी) ब्रेक केवल तुरंत घेरने वाले लूप या स्विच से बाहर निकलता है; बाहरी लूप नहीं. 🎯 Exam Perspective OOP Using C++ ("Control Statements" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: switch(2.5){ case 2: cout What is the output: int i=0; do{ cout What is the output: int x=10; switch(x){case 10: cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
11 Question 11 EN + हिं GB What is the output: switch(2.5){ case 2: cout<<'A'; break; default: cout<<'B'; } IN आउटपुट क्या है: स्विच (2.5) {केस 2: कॉउट A A ए B B बी C Compile error संकलन त्रुटि D AB अब ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Switch condition must be integer type; double is not allowed. Compile error. व्याख्या (हिन्दी) स्विच की स्थिति पूर्णांक प्रकार की होनी चाहिए; डबल की अनुमति नहीं है. संकलन त्रुटि. 🎯 Exam Perspective यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What does 'fallthrough' attribute do in C++17? What is a 'range-based for loop' iteration over a raw a... What is the output: int i=5; for(i=0; i 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
12 Question 12 EN + हिं GB What is the output: for(int i=1; i<=4; i*=2) cout< IN आउटपुट क्या है: for(int i=1; i A 1 2 4 1 2 4 B 1 2 3 4 1 2 3 4 C 2 4 2 4 D 1 4 1 4 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) i=1 (print 1), i=2 (print 2), i=4 (print 4), i=8>4 stop. Output: 1 2 4. व्याख्या (हिन्दी) i=1 (प्रिंट 1), i=2 (प्रिंट 2), i=4 (प्रिंट 4), i=8>4 स्टॉप। आउटपुट: 1 2 4. 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is a 'range-based for loop' iteration over a raw a... What is the output: for(;;) { static int x=0; cout What is the output: int i=5; for(i=0; i 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
13 Question 13 EN + हिं GB What is the output: int x=0; for(;x<5;) cout< IN आउटपुट क्या है: int x=0; के लिये(;x A 01234 01234 B 12345 12345 D Infinite loop अनंत लूप ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Empty init and increment; x++ post-increment prints then increments. Prints 0,1,2,3,4. व्याख्या (हिन्दी) खाली init और वेतन वृद्धि; x++ वृद्धि के बाद प्रिंट करता है और फिर वृद्धि करता है। 0,1,2,3,4 प्रिंट करता है। 🎯 Exam Perspective OOP Using C++ ("Control Statements" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: switch(2.5){ case 2: cout What is a 'range-based for loop' iteration over a raw a... What is the output: int i=0; do{ cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
14 Question 14 EN + हिं GB What does 'fallthrough' attribute do in C++17? IN C++17 में 'फ़ॉलथ्रू' विशेषता क्या करती है? A Forces compiler to fall through switch cases कंपाइलर को स्विच केस से गुजरने के लिए बाध्य करता है B Suppresses warning about intentional fallthrough जानबूझकर गिरावट के बारे में चेतावनी को दबा देता है C Makes switch case mandatory स्विच केस को अनिवार्य बनाता है D Removes need for break ब्रेक की आवश्यकता को दूर करता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) [[fallthrough]] suppresses the -Wimplicit-fallthrough compiler warning, indicating the fallthrough is intentional. व्याख्या (हिन्दी) [[फ़ॉलथ्रू]] -विम्प्लिसिट-फ़ॉलथ्रू कंपाइलर चेतावनी को दबा देता है, जो दर्शाता है कि फ़ॉलथ्रू जानबूझकर किया गया है। 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: for(int i=0;i What is a 'range-based for loop' iteration over a raw a... What happens when break is used inside a nested loop? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
15 Question 15 EN + हिं GB What is the output: int i=5; for(i=0; i<3; i++) {} cout< IN आउटपुट क्या है: int i=5; for(i=0; i A 5 5 B 3 3 C 2 2 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) i is declared outside for. After loop ends when i reaches 3, cout< व्याख्या (हिन्दी) मैं के लिए बाहर घोषित किया गया है. लूप समाप्त होने के बाद जब मैं 3 तक पहुँचता हूँ, तो कॉउट 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो OOP Using C++ ("Control Statements" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: for(int i=1; i What is a 'range-based for loop' iteration over a raw a... What does 'fallthrough' attribute do in C++17? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)