[C-Sharp Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ C-Sharp Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
381. Garbage Collector का मुख्य उद्देश्य क्या है?
[A] CPU increase करना
[B] Unused memory free करना
[C] Thread create करना
[D] File handling करना
381. What is the main purpose of Garbage Collector?
[A] Increase CPU
[B] Free unused memory
[C] Create thread
[D] File handling
सही उत्तर: Unused memory free करना
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Free unused memory
Explanation: Important question.
382. Generations (0,1,2) GC में क्यों use होते हैं?
[A] Thread management के लिए
[B] Performance optimization के लिए
[C] Database indexing के लिए
[D] File compression के लिए
382. Why are Generations (0,1,2) used in GC?
[A] Thread management
[B] Performance optimization
[C] Database indexing
[D] File compression
सही उत्तर: Performance optimization के लिए
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Performance optimization
Explanation: Important question.
383. Gen 0 objects किस category में आते हैं?
[A] Long-lived objects
[B] Short-lived objects
[C] Static objects
[D] Database objects
383. What kind of objects are in Gen 0?
[A] Long-lived objects
[B] Short-lived objects
[C] Static objects
[D] Database objects
सही उत्तर: Short-lived objects
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Short-lived objects
Explanation: Important question.
384. LOH (Large Object Heap) कब collect होता है?
[A] हर GC cycle में
[B] Rarely (Gen 2 के साथ)
[C] हर second में
[D] Manual only
384. When is LOH collected?
[A] Every GC cycle
[B] Rarely (with Gen 2)
[C] Every second
[D] Manual only
सही उत्तर: Rarely (Gen 2 के साथ)
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Rarely (with Gen 2)
Explanation: Important question.
385. Weak Reference का उपयोग किसलिए होता है?
[A] Strong memory hold के लिए
[B] Object को GC allow करने के लिए
[C] Thread lock के लिए
[D] Database caching के लिए
385. What is Weak Reference used for?
[A] Strong memory hold
[B] Allow GC to collect object
[C] Thread locking
[D] Database caching
सही उत्तर: Object को GC allow करने के लिए
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Allow GC to collect object
Explanation: Important question.
386. C# में StackOverflowException कब होती है?
[A] Memory full होने पर
[B] Infinite recursion होने पर
[C] File error होने पर
[D] Database error होने पर
386. When does StackOverflowException occur in C#?
[A] When memory is full
[B] When infinite recursion occurs
[C] When file error occurs
[D] When database error occurs
सही उत्तर: Infinite recursion होने पर
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: When infinite recursion occurs
Explanation: Important question.
387. NullReferenceException कब होती है?
[A] Variable initialized होने पर
[B] Null object पर access करने पर
[C] File open होने पर
[D] Thread start होने पर
387. When does NullReferenceException occur?
[A] When variable is initialized
[B] When accessing null object
[C] When file opens
[D] When thread starts
सही उत्तर: Null object पर access करने पर
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: When accessing null object
Explanation: Important question.
388. IndexOutOfRangeException किस कारण से होती है?
[A] Correct index access
[B] Invalid array index access
[C] Thread issue
[D] Memory issue
388. What causes IndexOutOfRangeException?
[A] Correct index access
[B] Invalid array index access
[C] Thread issue
[D] Memory issue
सही उत्तर: Invalid array index access
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Invalid array index access
Explanation: Important question.
389. InvalidCastException कब होती है?
[A] Correct type conversion
[B] Wrong type casting
[C] File read error
[D] Database error
389. When does InvalidCastException occur?
[A] Correct type conversion
[B] Wrong type casting
[C] File read error
[D] Database error
सही उत्तर: Wrong type casting
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Wrong type casting
Explanation: Important question.
390. try-catch का मुख्य उद्देश्य क्या है?
[A] Performance increase करना
[B] Exception handle करना
[C] Memory delete करना
[D] Thread create करना
390. What is the main purpose of try-catch?
[A] Increase performance
[B] Handle exceptions
[C] Delete memory
[D] Create thread
सही उत्तर: Exception handle करना
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Handle exceptions
Explanation: Important question.