181 Question 181 EN + हिं GB What happens when you pass an array to a function? IN जब आप किसी फ़ंक्शन में कोई सरणी पास करते हैं तो क्या होता है? A Array is copied ऐरे की प्रतिलिपि बनाई गई है B Array decays to pointer ऐरे सूचक तक क्षय हो जाता है C Compile error संकलन त्रुटि D Reference is created संदर्भ बनाया गया है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Arrays decay to pointers when passed to functions; the size information is lost. व्याख्या (हिन्दी) फ़ंक्शंस में पारित होने पर एरे पॉइंटर्स में क्षय हो जाते हैं; आकार की जानकारी खो गई है. 🎯 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[]={10,20,30}; for(int& x:a) x... What is a 'dangling pointer'? What is the output: int a[]={1,2,3,4,5}; int s=0; for(i... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
182 Question 182 EN + हिं GB What is the output: int a[3]={1,2,3}; cout<<*a<<*(a+1)<<*(a+2); IN आउटपुट क्या है: int a[3]={1,2,3}; अदालत A 123 123 B 321 321 C Undefined अपरिभाषित D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) *a=1, *(a+1)=2, *(a+2)=3. Output: 123. व्याख्या (हिन्दी) *ए=1, *(ए+1)=2, *(ए+2)=3. आउटपुट: 123. 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int x=5; int *p=nullptr; cout What is the output: int a[5]; cout What is 'pointer arithmetic' in C++? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
183 Question 183 EN + हिं GB What is std::array vs raw array in C++? IN C++ में std::array बनाम raw array क्या है? A std::array has bounds checking always std::array में हमेशा सीमाओं की जांच होती है B std::array knows its size, doesn't decay to pointer std::array अपना आकार जानता है, पॉइंटर तक ख़राब नहीं होता है C Raw arrays are faster always कच्चे ऐरे हमेशा तेज़ होते हैं D std::array uses heap std::array ढेर का उपयोग करता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::array is a fixed-size stack-allocated container that maintains size info and has iterators, unlike raw arrays. व्याख्या (हिन्दी) std::array एक निश्चित आकार का स्टैक-आवंटित कंटेनर है जो आकार की जानकारी रखता है और इसमें कच्चे सरणियों के विपरीत पुनरावर्तक होते हैं। 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो OOP Using C++ का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What happens when you pass an array to a function? What is the output: int x=10; int *p=&x; *p=20; cout What is the output: int a[3]={1,2,3}; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
184 Question 184 EN + हिं GB What is the output: int a[]={10,20,30}; for(int& x:a) x*=2; cout< IN आउटपुट क्या है: int a[]={10,20,30}; for(int& x:a) x*=2; अदालत A 20 20 B 40 40 C 30 30 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Range-for with reference doubles each element. a[1]=20*2=40. व्याख्या (हिन्दी) संदर्भ के साथ रेंज-फॉर प्रत्येक तत्व को दोगुना कर देता है। ए[1]=20*2=40. 🎯 Exam Perspective OOP Using C++ के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: int x=5; int *p=nullptr; cout What is a 'dangling pointer'? What is the output: int a[3]={1,2,3}; reverse(a,a+3); c... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
185 Question 185 EN + हिं GB What is the output: int a[3]; fill(a,a+3,5); cout< IN आउटपुट क्या है: int a[3]; भरें(ए,ए+3,5); अदालत A 5 5 C Undefined अपरिभाषित D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::fill fills all elements with 5. a[2]=5. व्याख्या (हिन्दी) std::fill सभी तत्वों को 5 से भरता है। a[2]=5। 🎯 Exam Perspective यह सवाल OOP Using C++ category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is std::array vs raw array in C++? What is the output: int a[]={1,2,3,4,5}; int s=0; for(i... What is the output: int a[3]={1,2,3}; reverse(a,a+3); c... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
186 Question 186 EN + हिं GB What is the output: int a[]={3,1,4,1,5}; cout<<*max_element(a,a+5); IN आउटपुट क्या है: int a[]={3,1,4,1,5}; अदालत A 5 5 B 4 4 C 3 3 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::max_element returns iterator to max element; *it=5. व्याख्या (हिन्दी) std::max_element पुनरावर्तक को अधिकतम तत्व पर लौटाता है; *यह=5. 🎯 Exam Perspective यह प्रश्न OOP Using C++ की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: int a[5]; cout What is the output: int a[3]={1,2,3}; reverse(a,a+3); c... What happens when you pass an array to a function? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
187 Question 187 EN + हिं GB What is 'array decay' in C++? IN C++ में 'सरणी क्षय' क्या है? A Array converted to pointer when used in most contexts अधिकांश संदर्भों में उपयोग किए जाने पर ऐरे को पॉइंटर में बदल दिया जाता है B Array size reduction सरणी आकार में कमी C Memory deallocation मेमोरी डिलोकेशन D Implicit casting अंतर्निहित कास्टिंग ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) In most expressions, array name decays to a pointer to its first element, losing size information. व्याख्या (हिन्दी) अधिकांश अभिव्यक्तियों में, सरणी नाम एक सूचक से उसके पहले तत्व तक कम हो जाता है, जिससे आकार की जानकारी खो जाती है। 🎯 Exam Perspective OOP Using C++ से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int a[3]={1,2,3}; reverse(a,a+3); c... What is std::array vs raw array in C++? What is the output: int x=10; int *p=&x; *p=20; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
188 Question 188 EN + हिं GB What is the output: int a[5]; cout< IN आउटपुट क्या है: int a[5]; अदालत A 20 20 20 20 B 20 8 20 8 C 20 4 20 4 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) sizeof(a)=20 (5 ints). a+0 causes decay to pointer; sizeof pointer=8 on 64-bit. व्याख्या (हिन्दी) आकार(ए)=20 (5 इंच)। a+0 पॉइंटर में क्षय का कारण बनता है; 64-बिट पर सूचक का आकार=8। 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int a[3]={1,2,3}; cout What is a 'dangling pointer'? What is 'array decay' in C++? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
189 Question 189 EN + हिं GB What is the output: int a[]={1,2,3,4,5}; int s=0; for(int x:a) s+=x; cout< IN आउटपुट क्या है: int a[]={1,2,3,4,5}; int s=0; for(int x:a) s+=x; अदालत A 15 15 B 10 10 C 5 5 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Sum of 1+2+3+4+5=15. व्याख्या (हिन्दी) 1+2+3+4+5=15 का योग. 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो OOP Using C++ का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int a=1,b=2; int *p=&a; p=&b; *p=10... What is std::array vs raw array in C++? What is the output: int a[3]; fill(a,a+3,5); cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
190 Question 190 EN + हिं GB What is the output: int a[3]={1,2,3}; reverse(a,a+3); cout< IN आउटपुट क्या है: int a[3]={1,2,3}; रिवर्स(ए,ए+3); अदालत A 321 321 B 123 123 C 132 132 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::reverse reverses in-place: {3,2,1}. Output: 321. व्याख्या (हिन्दी) std::रिवर्स इन-प्लेस रिवर्स: {3,2,1}। आउटपुट: 321. 🎯 Exam Perspective OOP Using C++ के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is 'pointer arithmetic' in C++? What is the output: int a[]={1,2,3,4,5}; int s=0; for(i... What is the output: int x=5; int *p=nullptr; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
191 Question 191 EN + हिं GB What is the output: int x=10; int *p=&x; *p=20; cout< IN आउटपुट क्या है: int x=10; int *p=&x; *पी=20; अदालत A 10 10 B 20 20 C Undefined अपरिभाषित D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) *p dereferences pointer to x; *p=20 sets x=20. व्याख्या (हिन्दी) *p सूचक को x से संदर्भित करता है; *p=20 सेट x=20. 🎯 Exam Perspective यह सवाल OOP Using C++ category का है, और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int x=5; int *p=nullptr; cout What is the output: int a[3]; fill(a,a+3,5); cout What is the output: int a[5]; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
192 Question 192 EN + हिं GB What is a 'dangling pointer'? IN 'लटकता सूचक' क्या है? A Pointer to freed/destroyed memory मुक्त/नष्ट की गई स्मृति का सूचक B Null pointer नल पॉइंटर C Void pointer शून्य सूचक D Pointer to stack ढेर करने के लिए सूचक ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) A dangling pointer points to memory that has been freed or gone out of scope, causing UB if dereferenced. व्याख्या (हिन्दी) एक लटकता हुआ सूचक उस मेमोरी की ओर इशारा करता है जो मुक्त हो गई है या दायरे से बाहर हो गई है, जिससे डीरेफ़रेंस होने पर यूबी उत्पन्न होता है। 🎯 Exam Perspective यह प्रश्न OOP Using C++ की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is 'array decay' in C++? What happens when you pass an array to a function? What is the output: int a[]={3,1,4,1,5}; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
193 Question 193 EN + हिं GB What is the output: int a=1,b=2; int *p=&a; p=&b; *p=10; cout< IN आउटपुट क्या है: int a=1,b=2; int *p=&a; पी=&बी; *पी=10; अदालत A 1 10 1 10 B 10 10 10 10 C 1 2 1 2 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) p is reassigned to &b. *p=10 sets b=10. a is unchanged. Output: 110. व्याख्या (हिन्दी) p को &b को पुनः सौंपा गया है। *पी=10 सेट बी=10. ए अपरिवर्तित है. आउटपुट: 110. 🎯 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[3]={1,2,3}; cout What happens when you pass an array to a function? What is the output: int a[3]; fill(a,a+3,5); cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
194 Question 194 EN + हिं GB What is the output: int x=5; int *p=nullptr; cout<<(p==nullptr); IN आउटपुट क्या है: int x=5; int *p=nullptr; अदालत B 1 1 C Undefined अपरिभाषित D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) p is null; p==nullptr is true=1. व्याख्या (हिन्दी) पी शून्य है; p==nullptr सत्य=1 है। 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What happens when you pass an array to a function? What is the output: int a[]={3,1,4,1,5}; cout What is 'array decay' in C++? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
195 Question 195 EN + हिं GB What is 'pointer arithmetic' in C++? IN C++ में 'पॉइंटर अंकगणित' क्या है? A Adding integers to pointers to navigate arrays सरणियों को नेविगेट करने के लिए पॉइंटर्स में पूर्णांक जोड़ना B Arithmetic on pointer values as integers पूर्णांकों के रूप में सूचक मानों पर अंकगणित C Only valid for void pointers केवल शून्य सूचकों के लिए मान्य है D A compile error एक संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Pointer arithmetic (p+n) moves pointer by n*sizeof(*p) bytes, valid within array bounds. व्याख्या (हिन्दी) पॉइंटर अंकगणित (p+n) पॉइंटर को n*sizeof(*p) बाइट्स द्वारा ले जाता है, जो सरणी सीमाओं के भीतर मान्य है। 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो OOP Using C++ का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int a[3]={1,2,3}; reverse(a,a+3); c... What is the output: int a=1,b=2; int *p=&a; p=&b; *p=10... What is the output: int a[]={10,20,30}; for(int& x:a) x... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)