[C-Sharp Programming MCQS ]

झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।

[ C-Sharp Programming MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
131. C# में IEnumerable का मुख्य उपयोग क्या है?
[A] Database Connection
[B] Collection को Iterate करना
[C] File बनाना
[D] Exception Handle करना
131. What is the primary purpose of IEnumerable in C#?
[A] Database connection
[B] To iterate through a collection
[C] Create files
[D] Handle exceptions
सही उत्तर: Collection को Iterate करना
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: To iterate through a collection
Explanation: Important question.
132. IQueryable मुख्य रूप से किसके साथ उपयोग किया जाता है?
[A] Console Application
[B] LINQ to Database
[C] Windows Forms
[D] File Handling
132. Where is IQueryable mainly used?
[A] Console Application
[B] LINQ to Database
[C] Windows Forms
[D] File Handling
सही उत्तर: LINQ to Database
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: LINQ to Database
Explanation: Important question.
133. IEnumerable और IQueryable में मुख्य अंतर क्या है?
[A] IEnumerable Server पर Execute होता है
[B] IQueryable Query को Data Source पर Execute करता है
[C] दोनों समान हैं
[D] IQueryable केवल Array पर कार्य करता है
133. What is the main difference between IEnumerable and IQueryable?
[A] IEnumerable executes on the server
[B] IQueryable executes the query on the data source
[C] Both are identical
[D] IQueryable works only with arrays
सही उत्तर: IQueryable Query को Data Source पर Execute करता है
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: IQueryable executes the query on the data source
Explanation: Important question.
134. C# में First() Method क्या करती है?
[A] अंतिम Record Return करती है
[B] पहला Record Return करती है
[C] सभी Records Return करती है
[D] Null Return करती है
134. What does the First() method do in C#?
[A] Returns the last record
[B] Returns the first record
[C] Returns all records
[D] Returns null
सही उत्तर: पहला Record Return करती है
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Returns the first record
Explanation: Important question.
135. यदि Collection Empty हो तो FirstOrDefault() क्या Return करती है?
[A] Exception
[B] Default Value
[C] Last Value
[D] Random Value
135. What does FirstOrDefault() return if the collection is empty?
[A] Exception
[B] Default value
[C] Last value
[D] Random value
सही उत्तर: Default Value
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Default value
Explanation: Important question.
136. C# में async Method सामान्यतः क्या Return करती है?
[A] void
[B] Task या Task
[C] string
[D] bool
136. What does an async method typically return in C#?
[A] void
[B] Task or Task
[C] string
[D] bool
सही उत्तर: Task या Task
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Task or Task
Explanation: Important question.
137. CancellationToken का उपयोग किसलिए किया जाता है?
[A] Memory Allocate करने के लिए
[B] Running Task को Cancel करने के लिए
[C] Loop बनाने के लिए
[D] Class Inherit करने के लिए
137. Why is CancellationToken used in C#?
[A] To allocate memory
[B] To cancel a running task
[C] To create loops
[D] To inherit classes
सही उत्तर: Running Task को Cancel करने के लिए
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: To cancel a running task
Explanation: Important question.
138. C# में lock Keyword का उपयोग किसलिए किया जाता है?
[A] Object Delete करने के लिए
[B] Thread Synchronization के लिए
[C] Method Override करने के लिए
[D] Exception Throw करने के लिए
138. Why is the lock keyword used in C#?
[A] To delete objects
[B] For thread synchronization
[C] To override methods
[D] To throw exceptions
सही उत्तर: Thread Synchronization के लिए
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: For thread synchronization
Explanation: Important question.
139. Mutex का मुख्य उद्देश्य क्या है?
[A] Multiple Threads को एक साथ Resource उपयोग करने देना
[B] एक समय में केवल एक Thread को Resource Access देना
[C] Database Create करना
[D] File Delete करना
139. What is the primary purpose of a Mutex in C#?
[A] Allow multiple threads to use a resource simultaneously
[B] Allow only one thread to access a resource at a time
[C] Create databases
[D] Delete files
सही उत्तर: एक समय में केवल एक Thread को Resource Access देना
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: Allow only one thread to access a resource at a time
Explanation: Important question.
140. Semaphore का उपयोग किसलिए किया जाता है?
[A] केवल एक Thread Allow करने के लिए
[B] सीमित संख्या में Threads को Resource Access देने के लिए
[C] Memory Free करने के लिए
[D] Garbage Collection के लिए
140. Why is a Semaphore used in C#?
[A] To allow only one thread
[B] To allow a limited number of threads to access a resource
[C] To free memory
[D] For garbage collection
सही उत्तर: सीमित संख्या में Threads को Resource Access देने के लिए
व्याख्या: महत्वपूर्ण प्रश्न।
Correct Answer: To allow a limited number of threads to access a resource
Explanation: Important question.