MCQOPTIONS
Saved Bookmarks
This section includes 623 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
| 301. |
Which preprocessor directive among the following forces the compiler to stop the compilation? |
| A. | #warning |
| B. | #endregion |
| C. | #undef |
| D. | #error |
| Answer» E. | |
| 302. |
What does preprocessor directive #if and #endif explains? |
| A. | Enables compilation of sequence of code on condition basis |
| B. | Express results into true or false on evaluation of condition |
| C. | If expression following #if is true then code that is between #if and #endif is compiled otherwise skipped |
| D. | All of the mentioned |
| Answer» E. | |
| 303. |
Select the defined preprocessor in C#.NET? |
| A. | #define |
| B. | #elif |
| C. | #else |
| D. | All of the mentioned |
| Answer» E. | |
| 304. |
What is meant by preprocessor directive #define? |
| A. | defines a character sequence |
| B. | helps in determining existence and non existence of a symbol |
| C. | can be used to create function like macros as in C/C++ |
| D. | all of the mentioned |
| Answer» B. helps in determining existence and non existence of a symbol | |
| 305. |
What is meant by preprocessor directive in C#.NET? |
| A. | a form of command which are interpreted by the compiler |
| B. | a form of macros like in c and c++ not exactly same to them , separately designed for C#.NET |
| C. | always begins with a ‘#’ character occupies separate line of source of code |
| D. | all of the mentioned |
| Answer» E. | |
| 306. |
Choose the symbol which begins a preprocessor directive in C#.NET? |
| A. | # |
| B. | ** |
| C. | * |
| D. | & |
| Answer» B. ** | |
| 307. |
If ListBox is the class of System.Windows.Forms namespace.Then,correct way to create an object of ListBox class is? |
| A. | using System.Windows.Forms; ListBox I = new ListBox(); |
| B. | System.Windows.Forms.ListBox I = new System.Windows.Forms.ListBox(); |
| C. | using LBControl I = new System.Windows.Forms.ListBox; |
| D. | All of the mentioned |
| Answer» E. | |
| 308. |
Which among the following is a .NET namespace? |
| A. | System.Web |
| B. | System.Process |
| C. | System.Drawing2D |
| D. | System.Drawing3D |
| Answer» B. System.Process | |
| 309. |
Which among the following statements are not correct about a namespace used in C#.NET? |
| A. | Nested namespaces are allowed |
| B. | Importing outer namespaces imports inner namespace |
| C. | Nested namespaces are allowed |
| D. | Importing outer namespace does not import inner namespace |
| Answer» C. Nested namespaces are allowed | |
| 310. |
Which among the following is a correct statement about namespace used in C#.NET? |
| A. | Classes must belong to a namespace, whereas structures need not |
| B. | All elements of the namespace must to belong to one file |
| C. | If not mentioned, a namespace takes the name of the current project |
| D. | All of the mentioned |
| Answer» D. All of the mentioned | |
| 311. |
Which among the following does not belong to the C#.NET namespace? |
| A. | class |
| B. | struct |
| C. | enum |
| D. | data |
| Answer» E. | |
| 312. |
Which is the correct statement about the namespaces in C#.NET? |
| A. | Nesting of namespaces is permitted, provided all the inner namespaces are declared in the same file |
| B. | A namespace cannot be tested |
| C. | There is no limit on the number of levels while nesting namespaces |
| D. | All of the mentioned |
| Answer» D. All of the mentioned | |
| 313. |
Which of the following is not a namespace in the .NET Framework Class Library? |
| A. | System.Process |
| B. | System.Security |
| C. | System.Threading |
| D. | System.xml |
| Answer» B. System.Security | |
| 314. |
What are the advantages of the named iterator? |
| A. | They allow to pass arguments to the iterator that control what elements are obtained |
| B. | This form of iterators can be overloaded |
| C. | Both They allow to pass arguments to the iterator that control what elements are obtained & This form of iterators can be overloaded |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 315. |
What does the yield return statement specify in above code snippet? |
| A. | returns the output |
| B. | returns the next object in the collection |
| C. | Both returns the output & returns the next object in the collection |
| D. | none of the mentioned |
| Answer» C. Both returns the output & returns the next object in the collection | |
| 316. |
What is an iterator? |
| A. | a method |
| B. | an operator |
| C. | accessor |
| D. | all of the mentioned |
| Answer» E. | |
| 317. |
Which method is used to abort thread prior to it’s normal execution? |
| A. | sleep() |
| B. | terminate() |
| C. | suspend() |
| D. | Abort() |
| Answer» E. | |
| 318. |
What is Semaphore? |
| A. | Grant more than one thread access to a shared resource at the same time |
| B. | Useful when a collection of resources is being synchronized |
| C. | Make use of a counter to control access to a shared resource |
| D. | All of the mentioned |
| Answer» E. | |
| 319. |
What is mutex? |
| A. | a mutually exclusive synchronization object |
| B. | can be acquired by more than one thread at a time |
| C. | helps in sharing of resource which can be used by one thread |
| D. | all of the mentioned |
| Answer» B. can be acquired by more than one thread at a time | |
| 320. |
What kind of exception is being thrown if Wait(),Pulse() or PulseAll() is called from code that is not within synchronized code? |
| A. | System I/O Exception |
| B. | DivideByZero Exception |
| C. | SynchronizationLockException |
| D. | All of the mentioned |
| Answer» D. All of the mentioned | |
| 321. |
Which method is called when a thread is blocked from running temporarily? |
| A. | Pulse() |
| B. | PulseAll() |
| C. | Wait() |
| D. | Both Pulse() & Wait() |
| Answer» D. Both Pulse() & Wait() | |
| 322. |
What is synchronization in reference to a thread? |
| A. | It’s a process of handling situations when two or more threads need access to a shared resource |
| B. | It’s a process by which many threads are able to access the same shared resource simultaneously |
| C. | It’s a process by which a method is able to access many different threads simultaneously |
| D. | It’s a method that allows too many threads to access any information they require |
| Answer» B. It’s a process by which many threads are able to access the same shared resource simultaneously | |
| 323. |
Which keyword is used for using the synchronization features defined by the Monitor class? |
| A. | lock |
| B. | synchronized |
| C. | monitor |
| D. | locked |
| Answer» B. synchronized | |
| 324. |
Which of these keywords are used to implement synchronization? |
| A. | synchronize |
| B. | syn |
| C. | synch |
| D. | synchronized |
| Answer» E. | |
| 325. |
On call of which type of method the new created thread will not start executing? |
| A. | Begin() |
| B. | Start() |
| C. | New() |
| D. | All of the mentioned |
| Answer» C. New() | |
| 326. |
Which of these classes is used to make a thread? |
| A. | String |
| B. | System |
| C. | Thread |
| D. | Runnable |
| Answer» D. Runnable | |
| 327. |
Choose the namespace which supports multithreading programming: |
| A. | System.net |
| B. | System.Linq |
| C. | System.Threading |
| D. | All of the mentioned |
| Answer» D. All of the mentioned | |
| 328. |
Number of threads that exists for each of the processes that occurs in the program: |
| A. | at most 1 |
| B. | atleast 1 |
| C. | only 1 |
| D. | both at most 1 & atleast 1 |
| Answer» E. | |
| 329. |
Select the two type of threads mentioned in the concept of multithreading: |
| A. | foreground |
| B. | background |
| C. | only foreground |
| D. | both foreground & background |
| Answer» E. | |
| 330. |
What is the advantage of the multithreading program? |
| A. | Enables to utilize the idle and executing time present in most programs |
| B. | Enables to utilize the idle time present in most programs |
| C. | Both Enables to utilize the idle and executing time present in most programs & Enables to utilize the idle time present in most programs |
| D. | Only Enables to utilize the idle time present in most programs |
| Answer» E. | |
| 331. |
Choose the statements which indicate the differences between the thread based multitasking and process based multitasking: |
| A. | Process-based multitasking handles the concurrent execution of programs |
| B. | Process-based multitasking handles the concurrent execution of pieces of the same program |
| C. | Thread-based multitasking handles the concurrent execution of programs |
| D. | Thread-based multitasking deals with the concurrent execution of pieces of the same program |
| Answer» B. Process-based multitasking handles the concurrent execution of pieces of the same program | |
| 332. |
Choose the correct statement about process-based multitasking: |
| A. | A feature that allows our computer to run two or more programs concurrently |
| B. | A program that acts as a small unit of code that can be dispatched by the scheduler |
| C. | Only A program that acts as a small unit of code that can be dispatched by the scheduler |
| D. | Both A feature that allows our computer to run two or more programs concurrently & A program that acts as a small unit of code that can be dispatched by the scheduler |
| Answer» E. | |
| 333. |
Select the type of multitasking methods that exist: |
| A. | process based |
| B. | thread based |
| C. | only process |
| D. | both process & thread based |
| Answer» E. | |
| 334. |
Which of the following functions return absolute value of a variable? |
| A. | Abs() |
| B. | Absolute() |
| C. | absolutevariable() |
| D. | None of the mentioned |
| Answer» B. Absolute() | |
| 335. |
Which of these methods return a largest whole number less than or equal to variable X? |
| A. | double Ciel(double X) |
| B. | double Floor(double X) |
| C. | double Max(double X) |
| D. | double Min(double X) |
| Answer» C. double Max(double X) | |
| 336. |
Which of these method returns a smallest whole number greater than or equal to variable X? |
| A. | double Ciel(double X) |
| B. | double Floor(double X) |
| C. | double Max(double X) |
| D. | double Min(double X) |
| Answer» B. double Floor(double X) | |
| 337. |
Which of these methods is a rounding function of Math class? |
| A. | Max() |
| B. | Min() |
| C. | Abs() |
| D. | Round() |
| Answer» E. | |
| 338. |
Which among the given classes provides types of rounding functions? |
| A. | Math |
| B. | Process |
| C. | System |
| D. | Object |
| Answer» B. Process | |
| 339. |
What is the value of double consonant ‘E’ defined in Math class? |
| A. | approximately 3 |
| B. | approximately 3.14 |
| C. | approximately 2.72 |
| D. | approximately 0 |
| Answer» D. approximately 0 | |
| 340. |
Which of these classes contains only floating point functions? |
| A. | Math |
| B. | Process |
| C. | System |
| D. | Object |
| Answer» B. Process | |
| 341. |
The wrong statements about a HashTable collection are? |
| A. | It is a keyed collection |
| B. | It is a ordered collection |
| C. | It’s not an indexed collection |
| D. | It implements a IDictionaryEnumerator interface in its inner class |
| Answer» C. It’s not an indexed collection | |
| 342. |
In which of the following collections is the I/O based on a key? |
| A. | BitArray |
| B. | SortedList |
| C. | Queue |
| D. | Stack |
| Answer» C. Queue | |
| 343. |
Which among the given statements are correct about the Stack collection? |
| A. | It can be used for evaluation of expressions |
| B. | It is used to maintain a FIFO list |
| C. | Top most element of the Stack collection can be accessed using the Peek() |
| D. | All of the mentioned |
| Answer» E. | |
| 344. |
Among the given collections which one is I/O index based? |
| A. | ArrayList |
| B. | List |
| C. | Stack |
| D. | Queue |
| Answer» B. List | |
| 345. |
Which statements among the following are correct about the Collection Classes available in Framework Class Library? |
| A. | Elements of a collection cannot be transmitted over a network |
| B. | Elements stored in a collection can be modified only if all the elements are of similar types |
| C. | Elements stored in a Collection can be retrieved but cannot be modified |
| D. | Collection classes make use of efficient algorithms to manage the collection, hence improving the performance of the program |
| Answer» E. | |
| 346. |
Which is the correct statement about an ArrayList collection that implements the IEnumerable interface? |
| A. | To access members of ArrayList from the inner class, it is necessary to pass ArrayList class reference to it |
| B. | The inner class of ArrayList can access ArrayList class members |
| C. | The ArrayList class consist of inner class that implements the IEnumerator interface |
| D. | All of the mentioned |
| Answer» E. | |
| 347. |
Which among the following is the correct way to find out the number of elements currently present in an ArrayListCollection called arr? |
| A. | arr.Capacity |
| B. | arr.Count |
| C. | arr.MaxIndex |
| D. | arr.UpperBound |
| Answer» C. arr.MaxIndex | |
| 348. |
Which among the following is not an interface declared in System.Collection namespace? |
| A. | IDictionaryComparer |
| B. | IEnumerable |
| C. | IEnumerator |
| D. | Icomparer |
| Answer» B. IEnumerable | |
| 349. |
Which among the following is not the ordered collection class? |
| A. | BitArray |
| B. | Queue |
| C. | Stack |
| D. | None of the mentioned |
| Answer» B. Queue | |
| 350. |
Choose the method defined by MemberInfo: |
| A. | GetCustomAttributes() |
| B. | IsDefined() |
| C. | GetCustomeAttributesData() |
| D. | All of the mentioned |
| Answer» E. | |