31 Question 31 EN + हिं GB What is the output: template T maxOf(T a,T b){return a>b?a:b;} cout< IN आउटपुट क्या है: टेम्पलेट T maxOf(T a,T b){return a>b?a:b;} cout A 72.5 72.5 B Compile error संकलन त्रुटि C Undefined अपरिभाषित D 3 7 3 7 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) maxOf(3,7)=7, maxOf(2.5,1.5)=2.5. Output: 72.5. व्याख्या (हिन्दी) maxOf(3,7)=7, maxOf(2.5,1.5)=2.5. आउटपुट: 72.5. 🎯 Exam Perspective OOP Using C++ ("Templates" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: template struct GCD{static const in... What is the output: template struct Remove{using type=T... What is the output: template struct IsVoid{static const... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
32 Question 32 EN + हिं GB What is the output: template struct Pair{T a,b; Pair(T x,T y):a(x),b(y){} T sum(){return a+b;}}; Pair p(3,4); cout< IN आउटपुट क्या है: टेम्पलेट स्ट्रक्चर पेयर{T a,b; जोड़ी(टी एक्स,टी वाई):ए(एक्स),बी(वाई){} टी योग(){रिटर्न ए+बी;}}; जोड़ी पी(3,4); अदालत A 7 7 B 12 12 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 3+4=7. Output: 7. व्याख्या (हिन्दी) 3+4=7. आउटपुट: 7. 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Templates" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: template T sumArr(T* arr,int n){T s... What is the output: template int count(Ts...){return si... What is the output: template struct Remove{using type=T... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
33 Question 33 EN + हिं GB What is the output: template auto add(T a,U b){return a+b;} cout< IN आउटपुट क्या है: टेम्पलेट ऑटो ऐड(टी ए,यू बी){रिटर्न ए+बी;} कॉउट A 3.5 3.5 B 3 3 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) int+double=3.5. Output: 3.5. व्याख्या (हिन्दी) int+डबल=3.5. आउटपुट: 3.5. 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो OOP Using C++ ("Templates" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: template T sumArr(T* arr,int n){T s... What is the output: template bool isNull(T* p){return p... What is the output: template class Stack{vectorv; publi... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
34 Question 34 EN + हिं GB What is the output: template void print(T v){cout< IN आउटपुट क्या है: टेम्पलेट शून्य प्रिंट (टी वी) {काउट A 1 A 3.14 1 ए 3.14 B Compile error संकलन त्रुटि C Undefined अपरिभाषित D 1A3 1ए3 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Prints each with space. Output: 1 A 3.14. व्याख्या (हिन्दी) प्रत्येक को स्थान के साथ प्रिंट करता है। आउटपुट: 1 ए 3.14. 🎯 Exam Perspective OOP Using C++ ("Templates" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: template void swap2(T& a,T& b){T t=... What is the output: template struct GCD{static const in... What is the output: template struct IsVoid{static const... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
35 Question 35 EN + हिं GB What is the output: template struct Square{static const int v=N*N;}; cout<::v; IN आउटपुट क्या है: टेम्पलेट स्ट्रक्चर स्क्वायर {static const int v=N*N;}; अदालत A 49 49 B 7 7 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 7*7=49. Output: 49. व्याख्या (हिन्दी) 7*7=49. आउटपुट: 49. 🎯 Exam Perspective यह सवाल OOP Using C++ ("Templates" sub-topic) category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: template T maxOf(T a,T b){return a>... What is the output: template bool isNull(T* p){return p... What is the output: template void swap2(T& a,T& b){T t=... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
36 Question 36 EN + हिं GB What is the output: template class Stack{vectorv; public: void push(T x){v.push_back(x);} T top(){return v.back();} int size(){return v.size();}}; Stack s; s.push(1);s.push(2);s.push(3); cout< IN आउटपुट क्या है: टेम्पलेट क्लास स्टैक{वेक्टरव; सार्वजनिक: शून्य पुश(T x){v.push_back(x);} T टॉप(){रिटर्न v.बैक();} int आकार(){रिटर्न v.आकार();}}; ढेर एस; एस.पुश(1);एस.पुश(2);एस.पुश(3); अदालत A 33 33 B 13 13 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) top=3, size=3. Output: 33. व्याख्या (हिन्दी) शीर्ष=3, आकार=3. आउटपुट: 33. 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Templates" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: template void print(T v){cout What is the output: template T power(T base,int exp){re... What is the output: template void swap2(T& a,T& b){T t=... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
37 Question 37 EN + हिं GB What is the output: template int count(Ts...){return sizeof...(Ts);} cout< IN आउटपुट क्या है: टेम्पलेट int count(Ts...){return sizeof...(Ts);} cout A 5 5 B 1 1 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 5 args. Output: 5. व्याख्या (हिन्दी) 5 तर्क. आउटपुट: 5. 🎯 Exam Perspective OOP Using C++ ("Templates" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: template struct Square{static const... What is the output: template T power(T base,int exp){re... What is the output: template struct Pair{T a,b; Pair(T... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
38 Question 38 EN + हिं GB What is the output: template T clamp(T v,T lo,T hi){return vhi?hi:v;} cout< IN आउटपुट क्या है: टेम्पलेट टी क्लैंप(टी वी,टी लो,टी हाय){रिटर्न वीएचआई?हाय:वी;} कॉउट A 5101 5101 B Compile error संकलन त्रुटि C Undefined अपरिभाषित D 5 10 1 5 10 1 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) clamp(5,1,10)=5, clamp(15,1,10)=10, clamp(-5,1,10)=1. Output: 5101. व्याख्या (हिन्दी) क्लैंप(5,1,10)=5, क्लैंप(15,1,10)=10, क्लैंप(-5,1,10)=1। आउटपुट: 5101. 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Templates" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: template struct Square{static const... What is the output: template int count(Ts...){return si... What is the output: template void print(T v){cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
39 Question 39 EN + हिं GB What is the output: template bool isNull(T* p){return p==nullptr;} int x=5; cout< IN आउटपुट क्या है: टेम्पलेट बूल isNull(T* p){return p==nullptr;} int x=5; अदालत A 01 01 B 10 10 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) &x!=null=0; nullptr=1. Output: 01. व्याख्या (हिन्दी) &x!=शून्य=0; nullptr=1. आउटपुट: 01. 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो OOP Using C++ ("Templates" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: template T power(T base,int exp){re... What is the output: template T maxOf(T a,T b){return a>... What is the output: template struct Pair{T a,b; Pair(T... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
40 Question 40 EN + हिं GB What is the output: template struct Remove{using type=T;}; template struct Remove{using type=T;}; cout<::type,int>; IN आउटपुट क्या है: टेम्पलेट संरचना निकालें{प्रकार=टी का उपयोग करके;}; टेम्प्लेट संरचना निकालें{प्रकार=टी का उपयोग करके;}; अदालत A 1 1 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Remove::type=int. is_same=true=1. Output: 1. व्याख्या (हिन्दी) हटाएँ::प्रकार=int. वही=सत्य=1 है. आउटपुट: 1. 🎯 Exam Perspective OOP Using C++ ("Templates" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: template void print(T v){cout What is the output: template int count(Ts...){return si... What is the output: template struct GCD{static const in... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
41 Question 41 EN + हिं GB What is the output: template T sumArr(T* arr,int n){T s{}; for(int i=0;i IN आउटपुट क्या है: टेम्पलेट T sumArr(T* arr,int n){T s{}; for(int i=0;i A 15 15 B 5 5 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Sum=15. Output: 15. व्याख्या (हिन्दी) योग=15. आउटपुट: 15. 🎯 Exam Perspective यह सवाल OOP Using C++ ("Templates" sub-topic) category का है, और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: template bool isNull(T* p){return p... What is the output: template T power(T base,int exp){re... What is the output: template struct IsVoid{static const... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
42 Question 42 EN + हिं GB What is the output: template struct IsVoid{static const bool v=false;}; template<> struct IsVoid{static const bool v=true;}; cout<::v<::v; IN आउटपुट क्या है: टेम्पलेट struct IsVoid{static const bool v=false;}; टेम्पलेट संरचना IsVoid{static const bool v=true;}; अदालत A 10 10 B 01 01 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) void=1, int=0. Output: 10. व्याख्या (हिन्दी) शून्य=1, पूर्णांक=0. आउटपुट: 10. 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Templates" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: template auto add(T a,U b){return a... What is the output: template int count(Ts...){return si... What is the output: template T maxOf(T a,T b){return a>... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
43 Question 43 EN + हिं GB What is the output: template T power(T base,int exp){return exp?base*power(base,exp-1):1;} cout< IN आउटपुट क्या है: टेम्पलेट T पॉवर(T बेस,int exp){रिटर्न exp?base*power(base,exp-1):1;} cout A 1024 1024 B 512 512 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 2^10=1024. Output: 1024. व्याख्या (हिन्दी) 2^10=1024. आउटपुट: 1024. 🎯 Exam Perspective OOP Using C++ ("Templates" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: template bool isNull(T* p){return p... What is the output: template struct GCD{static const in... What is the output: template T maxOf(T a,T b){return a>... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
44 Question 44 EN + हिं GB What is the output: template struct GCD{static const int v=GCD::v;}; template struct GCD{static const int v=N;}; cout<::v; IN आउटपुट क्या है: टेम्पलेट struct GCD{static const int v=GCD::v;}; टेम्पलेट संरचना GCD{static const int v=N;}; अदालत A 6 6 B 18 18 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) GCD(48,18)=6. Output: 6. व्याख्या (हिन्दी) जीसीडी(48,18)=6. आउटपुट: 6. 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Templates" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: template void print(T v){cout What is the output: template void swap2(T& a,T& b){T t=... What is the output: template struct Remove{using type=T... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
45 Question 45 EN + हिं GB What is the output: template void swap2(T& a,T& b){T t=a;a=b;b=t;} int x=3,y=7; swap2(x,y); cout< IN आउटपुट क्या है: टेम्पलेट void swim2(T& a,T& b){T t=a;a=b;b=t;} int x=3,y=7; स्वैप2(एक्स,वाई); अदालत A 73 73 B 37 37 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) x=7,y=3. Output: 73. व्याख्या (हिन्दी) x=7,y=3. आउटपुट: 73. 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो OOP Using C++ ("Templates" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: template void print(T v){cout What is the output: template struct Square{static const... What is the output: template T power(T base,int exp){re... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)