[C-Sharp Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ C-Sharp Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
351. ThreadPool का मुख्य फायदा क्या है?
[A] New thread हर बार create करना
[B] Thread reuse करना
[C] Memory increase करना
[D] CPU blocking करना
351. What is the main advantage of ThreadPool?
[A] Create new thread every time
[B] Reuse threads
[C] Increase memory
[D] Block CPU
सही उत्तर: Thread reuse करना
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Reuse threads
Explanation: Important question.
352. Race condition को रोकने के लिए क्या use किया जाता है?
[A] Random delay
[B] Lock / Interlocked
[C] Thread.Sleep
[D] GC.Collect
352. What is used to prevent race condition?
[A] Random delay
[B] Lock / Interlocked
[C] Thread.Sleep
[D] GC.Collect
सही उत्तर: Lock / Interlocked
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Lock / Interlocked
Explanation: Important question.
353. Task.Delay() का मुख्य उद्देश्य क्या है?
[A] Thread block करना
[B] Async wait introduce करना
[C] Memory free करना
[D] File delete करना
353. What is the main purpose of Task.Delay()?
[A] Block thread
[B] Introduce async wait
[C] Free memory
[D] Delete file
सही उत्तर: Async wait introduce करना
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Introduce async wait
Explanation: Important question.
354. Async method में await के बिना क्या problem हो सकती है?
[A] Better performance
[B] Blocking behavior
[C] Faster execution
[D] Memory optimization
354. What problem can occur without await in async method?
[A] Better performance
[B] Blocking behavior
[C] Faster execution
[D] Memory optimization
सही उत्तर: Blocking behavior
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Blocking behavior
Explanation: Important question.
355. Task Status Running कब होता है?
[A] Task complete होने पर
[B] Task execute होते समय
[C] Task cancel होने पर
[D] Task create होने से पहले
355. When is Task status Running?
[A] When task is completed
[B] When task is executing
[C] When task is cancelled
[D] Before task creation
सही उत्तर: Task execute होते समय
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: When task is executing
Explanation: Important question.
356. Task Status Faulted का मतलब क्या है?
[A] Task successfully complete हुआ
[B] Task में exception आया
[C] Task अभी pending है
[D] Task cancel हुआ
356. What does Task Status Faulted mean?
[A] Task completed successfully
[B] Task has exception
[C] Task is pending
[D] Task cancelled
सही उत्तर: Task में exception आया
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Task has exception
Explanation: Important question.
357. C# में ValueTask का उपयोग कब किया जाता है?
[A] Heavy database operations में
[B] Frequent synchronous result return optimize करने के लिए
[C] Thread creation के लिए
[D] File delete के लिए
357. When is ValueTask used in C#?
[A] Heavy database operations
[B] To optimize frequent synchronous result returns
[C] For thread creation
[D] For file deletion
सही उत्तर: Frequent synchronous result return optimize करने के लिए
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: To optimize frequent synchronous result returns
Explanation: Important question.
358. ValueTask और Task में मुख्य अंतर क्या है?
[A] दोनों same हैं
[B] ValueTask allocation कम करता है
[C] Task केवल sync होता है
[D] ValueTask केवल database के लिए है
358. What is the main difference between ValueTask and Task?
[A] Both are same
[B] ValueTask reduces allocation
[C] Task is only synchronous
[D] ValueTask is only for database
सही उत्तर: ValueTask allocation कम करता है
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: ValueTask reduces allocation
Explanation: Important question.
359. async method में exception कैसे handle होता है?
[A] Compile time पर
[B] Task के अंदर propagate होता है
[C] Never throw होता है
[D] Memory से हट जाता है
359. How is exception handled in async method?
[A] At compile time
[B] Propagated inside Task
[C] Never thrown
[D] Removed from memory
सही उत्तर: Task के अंदर propagate होता है
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Propagated inside Task
Explanation: Important question.
360. Deadlock detection किस situation में critical होता है?
[A] Single thread apps
[B] Multi-threaded applications
[C] Console apps only
[D] Static classes
360. In which situation is deadlock detection critical?
[A] Single thread apps
[B] Multi-threaded applications
[C] Console apps only
[D] Static classes
सही उत्तर: Multi-threaded applications
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Multi-threaded applications
Explanation: Important question.