151 Question 151 EN + हिं GB What is the output: int f(int n){ return n?n+f(n-1):0; } cout< IN आउटपुट क्या है: int f(int n){ return n?n+f(n-1):0; } कोउट A 10 10 B 4 4 C 24 24 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) f(4)=4+f(3)=4+3+f(2)=4+3+2+f(1)=4+3+2+1+f(0)=4+3+2+1+0=10. व्याख्या (हिन्दी) f(4)=4+f(3)=4+3+f(2)=4+3+2+f(1)=4+3+2+1+f(0)=4+3+2+1+0=10. 🎯 Exam Perspective OOP Using C++ से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int x=10; auto f=[&](){ return ++x;... What is 'function template argument deduction'? What is the output: int f(int x, int y=x){ return x+y;... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
152 Question 152 EN + हिं GB What is 'memoization' in the context of recursive functions? IN पुनरावर्ती कार्यों के संदर्भ में 'संस्मरण' क्या है? A Caching results of function calls फ़ंक्शन कॉल के कैशिंग परिणाम B Memory optimization technique मेमोरी अनुकूलन तकनीक C Using static variables स्थैतिक चर का उपयोग करना D Tail call optimization टेल कॉल अनुकूलन ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Memoization stores the results of expensive function calls and returns cached results when the same inputs occur again. व्याख्या (हिन्दी) मेमोइज़ेशन महंगे फ़ंक्शन कॉल के परिणामों को संग्रहीत करता है और समान इनपुट दोबारा होने पर कैश्ड परिणाम लौटाता है। 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int f(int n){ return n?n+f(n-1):0;... What is 'function template argument deduction'? What is the output: int f(int n){ return n>0?f(n/2)+1:0... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
153 Question 153 EN + हिं GB What is the output: int x=10; auto f=[&](){ return ++x; }; cout< IN आउटपुट क्या है: int x=10; ऑटो f=[&](){वापसी++x; }; अदालत A 1112 1112 B Unspecified अनिर्दिष्ट C 1112 1112 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Order of evaluation of arguments to << is unspecified before C++17; both calls modify x but print order is unspecified. व्याख्या (हिन्दी) तर्कों के मूल्यांकन का क्रम 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो OOP Using C++ का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int a[]={1,2,3}; cout What is the output: int f(int x){ return x; } double f(... What is 'memoization' in the context of recursive funct... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
154 Question 154 EN + हिं GB What is 'noexcept' specifier in C++? IN C++ में 'noexcept' विनिर्देशक क्या है? A Guarantees function throws no exceptions गारंटी फ़ंक्शन कोई अपवाद नहीं देता है B Prevents exception handling अपवाद प्रबंधन को रोकता है C Makes function constexpr फ़ंक्शन कॉन्स्टेक्सपीआर बनाता है D Catches all exceptions सभी अपवादों को पकड़ता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) noexcept declares that a function will not throw exceptions; if it does, std::terminate is called. व्याख्या (हिन्दी) noexcept घोषित करता है कि कोई फ़ंक्शन अपवाद नहीं फेंकेगा; यदि ऐसा होता है, तो std::terminet को कॉल किया जाता है। 🎯 Exam Perspective OOP Using C++ के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: int a[3][2]={{1,2},{3,4},{5,6}}; co... What is the output: int f(int n){ return n?n+f(n-1):0;... What is the output: int f(int n){ return n>0?f(n/2)+1:0... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
155 Question 155 EN + हिं GB What is the output: int f(int x, int y=x){ return x+y; } IN आउटपुट क्या है: int f(int x, int y=x){ return x+y; } A Works in C++17 C++17 में काम करता है B Compile error संकलन त्रुटि C Undefined behavior अपरिभाषित व्यवहार D Works if x is const यदि x स्थिरांक है तो काम करता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Default argument cannot refer to another parameter; this is a compile error. व्याख्या (हिन्दी) डिफ़ॉल्ट तर्क किसी अन्य पैरामीटर को संदर्भित नहीं कर सकता; यह एक संकलन त्रुटि है. 🎯 Exam Perspective यह सवाल OOP Using C++ category का है, और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is 'noexcept' specifier in C++? What is the output: int f(int n){ return n?n+f(n-1):0;... What is the output: int a[]={1,2,3}; int *p=a; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
156 Question 156 EN + हिं GB What is the output: void f(int* p){ *p=20; } int a=10; f(&a); cout< IN आउटपुट क्या है: void f(int* p){ *p=20; } int a=10; एफ(&ए); अदालत A 10 10 B 20 20 C Undefined अपरिभाषित D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) f takes pointer to int, dereferences and sets to 20, modifying a. Output: 20. व्याख्या (हिन्दी) f पॉइंटर को int, dereferences पर ले जाता है और a को संशोधित करते हुए 20 पर सेट करता है। आउटपुट: 20. 🎯 Exam Perspective यह प्रश्न OOP Using C++ की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is 'memoization' in the context of recursive funct... What is the output: int a[3][2]={{1,2},{3,4},{5,6}}; co... What is the output: int a[]={1,2,3}; int *p=a; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
157 Question 157 EN + हिं GB What is the output: int f(int n){ return n>0?f(n/2)+1:0; } cout< IN आउटपुट क्या है: int f(int n){ return n>0?f(n/2)+1:0; } कोउट A 3 3 B 4 4 C 8 8 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) f(8)=f(4)+1=f(2)+2=f(1)+3=f(0)+4=0+4=4. Wait: f(8)=f(4)+1; f(4)=f(2)+1; f(2)=f(1)+1; f(1)=f(0)+1=1; f(2)=2; f(4)=3; f(8)=4. Answer: 4. व्याख्या (हिन्दी) f(8)=f(4)+1=f(2)+2=f(1)+3=f(0)+4=0+4=4. रुको: f(8)=f(4)+1; f(4)=f(2)+1; f(2)=f(1)+1; f(1)=f(0)+1=1; एफ(2)=2; एफ(4)=3; एफ(8)=4. उत्तर: 4. 🎯 Exam Perspective OOP Using C++ से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int a[]={1,2,3}; int *p=a; cout What is the output: void f(int* p){ *p=20; } int a=10;... What is the size of: int arr[10]; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
158 Question 158 EN + हिं GB What is 'function template argument deduction'? IN 'फ़ंक्शन टेम्प्लेट तर्क कटौती' क्या है? A Compiler deducing template args from function arguments कंपाइलर फ़ंक्शन तर्कों से टेम्प्लेट तर्क निकालता है B Manually specifying template arguments टेम्पलेट तर्कों को मैन्युअल रूप से निर्दिष्ट करना C Runtime type deduction रनटाइम प्रकार की कटौती D Only works with auto केवल ऑटो के साथ काम करता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) When calling a function template, the compiler deduces template type parameters from the types of the provided arguments. व्याख्या (हिन्दी) फ़ंक्शन टेम्प्लेट को कॉल करते समय, कंपाइलर प्रदान किए गए तर्कों के प्रकारों से टेम्प्लेट प्रकार के पैरामीटर निकालता है। 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is 'memoization' in the context of recursive funct... What is the output: int x=10; auto f=[&](){ return ++x;... What is the output: int a[3][2]={{1,2},{3,4},{5,6}}; co... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
159 Question 159 EN + हिं GB What is the output: int f(int x){ return x; } double f(double x){ return x; } cout< IN आउटपुट क्या है: int f(int x){ return x; } डबल एफ (डबल एक्स) { रिटर्न एक्स; } कोउट A 1 1 B 1.0 1.0 C Ambiguous अस्पष्ट D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 1 is int literal; exact match to f(int). Output: 1. व्याख्या (हिन्दी) 1 पूर्णांक शाब्दिक है; f(int) से सटीक मिलान। आउटपुट: 1. 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो OOP Using C++ का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: auto f=[]()mutable{ static int x=0;... What is the output: int a[5]={1}; cout What is the output: int f(int n){ return n>0?f(n/2)+1:0... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
160 Question 160 EN + हिं GB What is the output: auto f=[]()mutable{ static int x=0; return x++; }; cout< IN आउटपुट क्या है: auto f=[]()mutable{static int x=0; वापसी x++; }; अदालत A 012 012 B 000 000 C Unspecified अनिर्दिष्ट D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Order of evaluation of arguments to << is unspecified, so print order of 0,1,2 is unspecified. व्याख्या (हिन्दी) तर्कों के मूल्यांकन का क्रम 🎯 Exam Perspective OOP Using C++ के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: int a[]={1,2,3}; int *p=a; cout What is the output: int f(int n){ return n>0?f(n/2)+1:0... What is the output: void f(int* p){ *p=20; } int a=10;... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
161 Question 161 EN + हिं GB What is the output: int a[]={1,2,3}; int *p=a; cout<<*(p+2); IN आउटपुट क्या है: int a[]={1,2,3}; int *p=a; अदालत A 3 3 B 2 2 C 1 1 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) p+2 points to a[2]=3. व्याख्या (हिन्दी) p+2 a[2]=3 की ओर इंगित करता है। 🎯 Exam Perspective यह सवाल OOP Using C++ category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is 'function template argument deduction'? What is the output: int a[5]={1}; cout What is the output: int f(int n){ return n>0?f(n/2)+1:0... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
162 Question 162 EN + हिं GB What is the output: int a[3][2]={{1,2},{3,4},{5,6}}; cout< IN What is the output: int a[3][2]={{1,2},{3,4},{5,6}}; अदालत A 4 4 B 3 3 C 2 2 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a[1][1] is row 1, col 1 = 4. व्याख्या (हिन्दी) a[1][1] पंक्ति 1 है, कॉलम 1 = 4। 🎯 Exam Perspective यह प्रश्न OOP Using C++ की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: auto f=[]()mutable{ static int x=0;... What is the output: int a[]={1,2,3}; cout What is the output: int f(int n){ return n>0?f(n/2)+1:0... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
163 Question 163 EN + हिं GB What is the size of: int arr[10]; cout< IN What is the size of: int arr[10]; अदालत A 10 10 B 40 40 C 8 8 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) sizeof(arr)=10*sizeof(int)=10*4=40 on most platforms. व्याख्या (हिन्दी) अधिकांश प्लेटफ़ॉर्म पर sizeof(arr)=10*sizeof(int)=10*4=40। 🎯 Exam Perspective OOP Using C++ से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int x=10; auto f=[&](){ return ++x;... What is the output: int f(int n){ return n?n+f(n-1):0;... What is the output: int f(int n){ return n>0?f(n/2)+1:0... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
164 Question 164 EN + हिं GB What is the output: int a[5]={1}; cout< IN What is the output: int a[5]={1}; अदालत A 1 1 C Undefined अपरिभाषित D Garbage कचरा ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Partial initialization zero-fills remaining elements: a[4]=0. व्याख्या (हिन्दी) आंशिक आरंभीकरण शून्य-शेष तत्वों को भरता है: a[4]=0। 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int x=10; auto f=[&](){ return ++x;... What is the output: int f(int n){ return n?n+f(n-1):0;... What is the output: void f(int* p){ *p=20; } int a=10;... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
165 Question 165 EN + हिं GB What is the output: int a[]={1,2,3}; cout< IN आउटपुट क्या है: int a[]={1,2,3}; अदालत A 1 1 B 3 3 C 4 4 D 12 12 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) sizeof(a)=12, sizeof(a[0])=4. 12/4=3 (array length). व्याख्या (हिन्दी) आकार(ए)=12, आकार(ए[0])=4. 12/4=3 (सरणी लंबाई)। 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो OOP Using C++ का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is 'function template argument deduction'? What is the size of: int arr[10]; cout What is the output: int a[5]={1}; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)