[C-Sharp Programming MCQS ]
झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।
[ C-Sharp Programming MCQS ]
Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
341. Task.Run() किस thread पर execute होता है?
[A] Main thread
[B] UI thread only
[C] ThreadPool thread
[D] Database thread
341. On which thread does Task.Run() execute?
[A] Main thread
[B] UI thread only
[C] ThreadPool thread
[D] Database thread
सही उत्तर: ThreadPool thread
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: ThreadPool thread
Explanation: Important question.
342. CancellationToken का मुख्य उद्देश्य क्या है?
[A] Thread create करना
[B] Running task को cancel करना
[C] Memory allocate करना
[D] File open करना
342. What is the main purpose of CancellationToken?
[A] Create thread
[B] Cancel running task
[C] Allocate memory
[D] Open file
सही उत्तर: Running task को cancel करना
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Cancel running task
Explanation: Important question.
343. Task.WhenAll() क्या return करता है?
[A] Single Task
[B] Array of completed results
[C] Exception only
[D] Null value
343. What does Task.WhenAll() return?
[A] Single task
[B] Array of completed results
[C] Exception only
[D] Null value
सही उत्तर: Array of completed results
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Array of completed results
Explanation: Important question.
344. Task.WhenAny() का output क्या होता है?
[A] All tasks
[B] First completed task
[C] Last task
[D] Null
344. What is the output of Task.WhenAny()?
[A] All tasks
[B] First completed task
[C] Last task
[D] Null
सही उत्तर: First completed task
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: First completed task
Explanation: Important question.
345. Parallel.ForEach का use किसलिए होता है?
[A] Sequential execution
[B] Parallel processing
[C] Database query
[D] File compression
345. What is the use of Parallel.ForEach?
[A] Sequential execution
[B] Parallel processing
[C] Database query
[D] File compression
सही उत्तर: Parallel processing
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Parallel processing
Explanation: Important question.
346. Thread.Sleep() का effect क्या होता है?
[A] Thread destroy करता है
[B] Thread को temporarily pause करता है
[C] Memory clear करता है
[D] CPU increase करता है
346. What is the effect of Thread.Sleep()?
[A] Destroys thread
[B] Pauses thread temporarily
[C] Clears memory
[D] Increases CPU
सही उत्तर: Thread को temporarily pause करता है
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Pauses thread temporarily
Explanation: Important question.
347. C# में Task.Run() और Task.Factory.StartNew() में मुख्य अंतर क्या है?
[A] दोनों same हैं
[B] Task.Run() simple background work के लिए होता है
[C] StartNew() केवल UI thread के लिए होता है
[D] Task.Run() synchronous होता है
347. What is the main difference between Task.Run() and Task.Factory.StartNew()?
[A] Both are same
[B] Task.Run() is used for simple background work
[C] StartNew() is only for UI thread
[D] Task.Run() is synchronous
सही उत्तर: Task.Run() simple background work के लिए होता है
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Task.Run() is used for simple background work
Explanation: Important question.
348. ConfigureAwait(true) का default behavior क्या होता है?
[A] Context capture नहीं करता
[B] Context capture करता है
[C] Thread kill करता है
[D] Memory free करता है
348. What is the default behavior of ConfigureAwait(true)?
[A] Does not capture context
[B] Captures context
[C] Kills thread
[D] Frees memory
सही उत्तर: Context capture करता है
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Captures context
Explanation: Important question.
349. Deadlock होने की सबसे common वजह क्या है?
[A] Fast CPU
[B] Improper lock ordering
[C] Extra memory
[D] Garbage collection
349. What is the most common reason for deadlock?
[A] Fast CPU
[B] Improper lock ordering
[C] Extra memory
[D] Garbage collection
सही उत्तर: Improper lock ordering
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Improper lock ordering
Explanation: Important question.
350. SemaphoreSlim का मुख्य use क्या है?
[A] Unlimited threads allow करना
[B] Limited concurrency control करना
[C] File delete करना
[D] Database create करना
350. What is the main use of SemaphoreSlim?
[A] Allow unlimited threads
[B] Control limited concurrency
[C] Delete file
[D] Create database
सही उत्तर: Limited concurrency control करना
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Control limited concurrency
Explanation: Important question.