976 Question 976 EN + हिं GB The output of: class A{public:virtual int f(){return 1;}}; class B:public A{public:int f()override{return 2;}}; class C:public B{public:int f()override{return 3;}}; A*p=new C; cout<f(); IN इसका आउटपुट: क्लास ए{पब्लिक:वर्चुअल इंट एफ(){रिटर्न 1;}}; कक्षा बी:सार्वजनिक ए{सार्वजनिक:int f()ओवरराइड{वापसी 2;}}; कक्षा सी:सार्वजनिक बी{सार्वजनिक:int f()ओवरराइड{वापसी 3;}}; ए*पी=नया सी; अदालत A 1 1 B 2 2 C 3 3 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Dynamic dispatch: p points to C; C::f() returns 3. व्याख्या (हिन्दी) गतिशील प्रेषण: पी सी को इंगित करता है; C::f() रिटर्न 3. 🎯 Exam Perspective Data Structures and Algorithms के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions The output of: class A{public:int f(){return 1;} virtua... The output of: template T min3(T a,T b,T c){return a The output of: auto r=views::iota(1)|views::take(5); fo... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
977 Question 977 EN + हिं GB The output of: class A{public:int f(){return 1;} virtual int g(){return 10;}}; class B:public A{public:int f(){return 2;} int g()override{return 20;}}; A*p=new B; cout<f()<g(); IN इसका आउटपुट: क्लास ए {पब्लिक: इंट एफ() {रिटर्न 1;} वर्चुअल इंट जी() {रिटर्न 10;}}; कक्षा बी:सार्वजनिक ए{सार्वजनिक:int f(){रिटर्न 2;} int g()ओवरराइड{रिटर्न 20;}}; ए*पी=नया बी; अदालत A 12 12 B 1 20 1 20 C 2 10 2 10 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) p->f(): non-virtual, calls A::f()=1; p->g(): virtual, calls B::g()=20. व्याख्या (हिन्दी) p->f(): गैर-आभासी, कॉल A::f()=1; p->g(): आभासी, कॉल B::g()=20। 🎯 Exam Perspective यह सवाल Data Structures and Algorithms category का है, और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int x=5; auto f=[x=move(x)](){retur... The output of: vector v1={1,2,3}; vector v2=move(v1); c... The output of: string s1="Hello"; string s2=move(s1); c... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
978 Question 978 EN + हिं GB The output of: template T min3(T a,T b,T c){return a IN इसका आउटपुट: टेम्पलेट T min3(T a,T b,T c){return a A 1 1 B 2 2 C 3 3 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) min(3,1,2)=1. व्याख्या (हिन्दी) मिनट(3,1,2)=1. 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: map m={{1,"one"},{2,"two"},{3,"three"}};... The output of: vector v1={1,2,3}; vector v2=move(v1); c... The output of: auto v=vector{3,1,4,1,5,9,2,6}; ranges::... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
979 Question 979 EN + हिं GB The output of: vector v={5,2,8,1,9}; auto comp=[](int a,int b){return a>b;}; sort(v.begin(),v.end(),comp); cout< IN का आउटपुट: वेक्टर v={5,2,8,1,9}; ऑटो COMP=[](int a,int b){return a>b;}; क्रमबद्ध करें (v.begin(),v.end(),comp); अदालत A 1 1 B 5 5 C 9 9 D 2 2 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Descending sort; v[0]=9. व्याख्या (हिन्दी) अवरोही प्रकार; वी[0]=9. 🎯 Exam Perspective Data Structures and Algorithms से जुड़ा यह सवाल उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions The output of: expected e=42; cout The output of: string s1="Hello"; string s2=move(s1); c... The output of: class A{public:int f(){return 1;} virtua... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
980 Question 980 EN + हिं GB The output of: map m={{1,"one"},{2,"two"},{3,"three"}}; for(auto &[k,v]:m) cout< IN इसका आउटपुट: मानचित्र m={{1,"एक"},{2,"दो"},{3,"तीन"}}; for(auto &[k,v]:m) कॉउट A ott ओ.टी B oto ओटो C ooo ओह D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) one->o, two->t, three->t; outputs ott. व्याख्या (हिन्दी) एक->ओ, दो->टी, तीन->टी; आउटपुट ओ.टी. 🎯 Exam Perspective UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions The output of: expected e=unexpected("error"); cout The output of: expected e=42; cout The output of: auto v=vector{3,1,4,1,5,9,2,6}; ranges::... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
981 Question 981 EN + हिं GB The output of: auto v=vector{3,1,4,1,5,9,2,6}; ranges::sort(v); cout< IN का आउटपुट: ऑटो v=वेक्टर{3,1,4,1,5,9,2,6}; श्रेणियाँ::सॉर्ट(v); अदालत A 19 19 B 18 18 C 91 91 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Sorted: {1,1,2,3,4,5,6,9}; v[0]=1, v[7]=9. व्याख्या (हिन्दी) क्रमबद्ध: {1,1,2,3,4,5,6,9}; v[0]=1, v[7]=9. 🎯 Exam Perspective अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions The output of: string s1="Hello"; string s2=move(s1); c... The output of: vector v={5,2,8,1,9}; auto comp=[](int a... The output of: expected e=unexpected("error"); cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
982 Question 982 EN + हिं GB The output of: auto r=views::iota(1)|views::take(5); for(auto x:r)cout< IN का आउटपुट: ऑटो r=views::iota(1)|views::take(5); for(auto x:r)cout A 12345 12345 B 01234 01234 C 5 5 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) iota from 1 taking 5: 1,2,3,4,5. व्याख्या (हिन्दी) 1 से आईओटीए 5 लेते हुए: 1,2,3,4,5। 🎯 Exam Perspective Data Structures and Algorithms के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions The output of: class A{public:virtual int f(){return 1;... The output of: vector v={5,2,8,1,9}; auto comp=[](int a... What is the output: int x=5; auto f=[x=move(x)](){retur... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
983 Question 983 EN + हिं GB The output of: int n=100; auto isprime=[](int n){for(int i=2;i*i<=n;i++) if(n%i==0)return false; return n>1;}; auto primes=views::iota(2)|views::filter(isprime)|views::take(5); cout< IN इसका आउटपुट: int n=100; ऑटो प्राइम=[](int n){for(int i=2;i*i1;}; ऑटो प्राइम्स=व्यूज::आईओटा(2)|व्यूज::फिल्टर(आईएसप्राइम)|व्यूज::टेक(5); कॉउट A 5 5 B 10 10 C 4 4 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) First 5 primes: 2,3,5,7,11; distance=5. व्याख्या (हिन्दी) प्रथम 5 अभाज्य संख्याएँ: 2,3,5,7,11; दूरी=5. 🎯 Exam Perspective यह सवाल Data Structures and Algorithms category का है, और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions The output of: map m={{1,"one"},{2,"two"},{3,"three"}};... The output of: expected e=unexpected("error"); cout The output of: unique_ptr p=make_unique(42); unique_ptr... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
984 Question 984 EN + हिं GB The output of: expected e=42; cout< IN का आउटपुट: अपेक्षित e=42; अदालत A Error गलती B 42 42 D string डोरी ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) expected holds int 42; value() returns 42. व्याख्या (हिन्दी) अपेक्षित होल्ड int 42; वैल्यू() 42 लौटाता है। 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: expected e=unexpected("error"); cout The output of: template T min3(T a,T b,T c){return a The output of: class A{public:int f(){return 1;} virtua... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
985 Question 985 EN + हिं GB The output of: expected e=unexpected("error"); cout< IN का आउटपुट: अपेक्षित ई=अप्रत्याशित('त्रुटि'); अदालत A 1 1 C Error गलती D string डोरी ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) unexpected sets error state; has_value()=false=0. व्याख्या (हिन्दी) अप्रत्याशित सेट त्रुटि स्थिति; has_value()=गलत=0. 🎯 Exam Perspective Data Structures and Algorithms से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions The output of: int n=100; auto isprime=[](int n){for(in... The output of: class A{public:virtual int f(){return 1;... The output of: vector v1={1,2,3}; vector v2=move(v1); c... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
986 Question 986 EN + हिं GB What is the output: int x=5; auto f=[x=move(x)](){return x;}; cout< IN आउटपुट क्या है: int x=5; ऑटो f=[x=move(x)](){रिटर्न x;}; अदालत A 55 55 B 50 50 C 05 05 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Move x into lambda (x=5 copied for int); original x becomes indeterminate; f()=5, x indeterminate. व्याख्या (हिन्दी) x को लैम्ब्डा में ले जाएँ (x=5 int के लिए कॉपी किया गया); मूल x अनिश्चित हो जाता है; f()=5, x अनिश्चित। 🎯 Exam Perspective SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions The output of: int n=100; auto isprime=[](int n){for(in... The output of: auto v=vector{3,1,4,1,5,9,2,6}; ranges::... The output of: expected e=42; cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
987 Question 987 EN + हिं GB The output of: string s1="Hello"; string s2=move(s1); cout< IN इसका आउटपुट: स्ट्रिंग s1='हैलो'; स्ट्रिंग s2=move(s1); अदालत A 5 5 5 5 B 0 5 0 5 C 5 0 5 0 D 0 0 0 0 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) After move, s1 is empty (size 0); s2 has content (size 5). व्याख्या (हिन्दी) स्थानांतरित होने के बाद, s1 खाली है (आकार 0); s2 में सामग्री (आकार 5) है। 🎯 Exam Perspective अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions The output of: int n=100; auto isprime=[](int n){for(in... The output of: auto r=views::iota(1)|views::take(5); fo... What is the output: int x=5; auto f=[x=move(x)](){retur... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
988 Question 988 EN + हिं GB The output of: vector v1={1,2,3}; vector v2=move(v1); cout< IN का आउटपुट: वेक्टर v1={1,2,3}; वेक्टर v2=चाल(v1); अदालत A 3 3 3 3 B 0 3 0 3 C 3 0 3 0 D 0 0 0 0 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) After move, v1 is empty; v2 has 3 elements. व्याख्या (हिन्दी) स्थानांतरित होने के बाद, v1 खाली है; v2 में 3 तत्व हैं। 🎯 Exam Perspective Data Structures and Algorithms के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions The output of: template T min3(T a,T b,T c){return a The output of: class A{public:int f(){return 1;} virtua... The output of: class A{public:virtual int f(){return 1;... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
989 Question 989 EN + हिं GB The output of: unique_ptr p=make_unique(42); unique_ptr q=move(p); cout<<(p?"has":"null")<<(q?"has":"null"); IN का आउटपुट:unique_ptr p=make_unique(42); अद्वितीय_पीटीआर क्यू=मूव(पी); अदालत A hashas है है B nullhas नलहास C hasnull शून्य D nullnull शून्य-शून्य ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) After move, p is null; q has the value. व्याख्या (हिन्दी) चाल के बाद, p शून्य है; q का मान है. 🎯 Exam Perspective यह सवाल Data Structures and Algorithms category का है, और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions The output of: vector v1={1,2,3}; vector v2=move(v1); c... The output of: class A{public:int f(){return 1;} virtua... The output of: vector v={5,2,8,1,9}; auto comp=[](int a... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
990 Question 990 EN + हिं GB The output of: shared_ptr sp=make_shared(10); { shared_ptr sp2=sp; cout< IN इसका आउटपुट: share_ptr sp=make_shared(10); {shared_ptr sp2=sp; अदालत A 2 1 2 1 B 1 1 11 C 2 2 2 2 D 1 2 1 2 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Inside block: 2 owners; after block sp2 destroyed: 1 owner. व्याख्या (हिन्दी) अंदर का ब्लॉक: 2 मालिक; ब्लॉक एसपी2 नष्ट होने के बाद: 1 मालिक। 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: class A{public:int f(){return 1;} virtua... The output of: auto r=views::iota(1)|views::take(5); fo... The output of: string s1="Hello"; string s2=move(s1); c... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)