Explore topic-wise MCQs in Technical Programming.

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.

351.

The property signifies “Obtains a Module object that represents the module (an executable file) in which the reflected type resides”. Choose the property which specifies the following statement:

A. Type DeclaringType
B. int MetadataToken
C. Module Module
D. Type ReflectedType
Answer» D. Type ReflectedType
352.

What does the following property signify?MemberTypes MemberType

A. Helps in distinguishing kinds of members
B. Property helps in determining if member is a field, method, property or event
C. Both Helps in distinguishing kinds of members & Property helps in determining if member is a field, method, property or event
D. None of the mentioned
Answer» D. None of the mentioned
353.

Choose the class from which the namespace ‘System.Type’ is derived:

A. System.Reflection
B. System.Reflection.MemberInfo
C. Both System.Reflection & System.Reflection.MemberInfo
D. None of the mentioned
Answer» C. Both System.Reflection & System.Reflection.MemberInfo
354.

Choose the namespace which consists of classes that are part of .NET Reflection API:

A. Core of the reflection subsystem as it encapsulates a type
B. Consists of many methods and properties that can be used to obtain information about a type at runtime
C. Both Core of the reflection subsystem as it encapsulates a type & Consists of many methods and properties that can be used to obtain information about a type at runtime
D. Only Consists of many methods and properties that can be used to obtain information about a type at runtime
Answer» D. Only Consists of many methods and properties that can be used to obtain information about a type at runtime
355.

Which feature enables to obtain information about the use and capabilities of types at runtime?

A. Runtime type ID
B. Reflection
C. Attributes
D. None of the mentioned
Answer» C. Attributes
356.

Which operator among the following supplies the information about characteristics of a typeof?

A. is
B. as
C. typeof
D. none of the mentioned
Answer» D. none of the mentioned
357.

Which operator among the following is used to perform the operation of boxing, unboxing, reference and identity conversions?

A. is
B. as
C. typeof
D. all of the mentioned
Answer» C. typeof
358.

Which operator among the following supports the operation of conversion at runtime without generating the exceptions?

A. is
B. as
C. typeof
D. all of the mentioned
Answer» C. typeof
359.

Select the Keyword which supports the run time type identification:

A. is, as
B. as, typeof
C. Both is, as & as, typeof
D. Only is, as
Answer» D. Only is, as
360.

Select the statement which are correct about RTTI(Runtime type identification):

A. It allows the type of an object to be determined during program execution
B. It tells what type of object is being referred to by a base class reference determined by RTTI
C. Helps in prevention of an invalid cast exception in advance
D. All of the mentioned
Answer» E.
361.

Which mechanism among the following helps in identifying a type during the execution of a program?

A. Reflection
B. Runtime type ID
C. Both Reflection & Runtime type ID
D. None of the mentioned
Answer» C. Both Reflection & Runtime type ID
362.

Which method will be used to copy content from one array to another array?

A. Copy()
B. copy()
C. Both Copy() & copy()
D. None of the mentioned
Answer» B. copy()
363.

Choose the correct statement about the IComparer interface in C#:

A. The IComparer interface is in System.Collections
B. It defines a method called Compare(), which compares the values of two objects
C. Both The IComparer interface is in System.Collections & It defines a method called Compare(), which compares the values of two objects
D. None of the mentioned
Answer» D. None of the mentioned
364.

Select the interfaces implemented by array class:

A. ICloneable, ICollection
B. IEnumerable, IStructuralComparable, IStructuralEquatable
C. ICloneable, ICollection, IList
D. Only IEnumerable, IStructuralComparable, IStructuralEquatable & ICloneable, ICollection, IList
Answer» E.
365.

Select the class which is the base class for all arrays in C#?

A. Array
B. Text
C. arrays
D. Both Array & Text
Answer» B. Text
366.

Select the namespace which should be included while making use of LINQ operations:

A. System.Text
B. System.Collections.Generic
C. System.Linq
D. None of the mentioned
Answer» D. None of the mentioned
367.

Can we use linq to query against a DataTable?

A. Yes
B. No
C. Either Yes or No
D. None of the mentioned
Answer» C. Either Yes or No
368.

Choose the namespace in which the interface IEnumerable is declared?

A. System.Collections
B. System.Collections.Generic
C. Both System.Collections & System.Collections.Generic
D. None of the mentioned
Answer» C. Both System.Collections & System.Collections.Generic
369.

Choose the wrong statement about the LINQ?

A. The main concept behind the linq is query
B. linq makes use of foreach loop to execute the query
C. It is not required that linq should make use of IEnumerable interface
D. None of the mentioned
Answer» D. None of the mentioned
370.

Assume 2 columns named as Product and Category how can be both sorted out based on first by category and then by product name?

A. var sortedProds = _db.Products.Orderby(c => c.Category)
B. var sortedProds = _db.Products.Orderby(c => c.Category) + ThenBy(n => n.Name)
C. var sortedProds = _db.Products.Orderby(c => c.Category) . ThenBy(n => n.Name)
D. all of the mentioned
Answer» D. all of the mentioned
371.

Which of given statements are valid about generics in .NET Framework?

A. generics are useful in collection classes in .NET framework
B. generics delegates are not allowed in C#.NET
C. generics is a not language feature
D. all of the mentioned
Answer» B. generics delegates are not allowed in C#.NET
372.

Which of these type parameters is used for generic methods to return and accept any type of object?

A. K
B. N
C. T
D. V
Answer» D. V
373.

Which among the given classes is present in System.Collection.Generic.namespace?

A. Stack
B. Tree
C. Sorted Array
D. All of the mentioned
Answer» B. Tree
374.

Select the type argument of an open constructed type?

A. Gen<int>
B. Gen<T>
C. Gen<>
D. None of the mentioned
Answer» D. None of the mentioned
375.

Choose the advantages of using generics?

A. Generics facilitate type safety
B. Generics facilitate improved performance and reduced code
C. Generics promote the usage of parameterized types
D. All of the mentioned
Answer» E.
376.

Are generics in C# are same as the generics in java and templates in C++?

A. Yes
B. No
C. May be
D. None of the mentioned
Answer» C. May be
377.

What is meant by the term generics?

A. parameterized types
B. class
C. structure
D. interface
Answer» B. class
378.

Select the modifiers which control the accessibility of the delegate:

A. new
B. protected
C. public
D. all of the mentioned
Answer» E.
379.

Incorrect statements about delegates are?

A. Delegates are reference types
B. Delegates are object oriented
C. Delegates are type safe
D. Only one method can be called using a delegate
Answer» E.
380.

Which of the following are the correct statements about delegates?

A. Delegates can be used to implement callback notification
B. Delegates permit execution of a method on a secondary thread in an asynchronous manner
C. Delegate is a user defined type
D. All of the mentioned
Answer» E.
381.

Choose the statements which makes delegate in C#.NET different from a normal class?

A. Delegates in C#.NET is a base class for all delegates type
B. Delegates created in C#.NET are further not allowed to derive from the delegate types that are created
C. Only system and compilers can derive explicitly from the Delegate or MulticasteDelegate class
D. All of the mentioned
Answer» E.
382.

Which of the following statements is correct about a delegate?

A. inheritance is a prerequisite for using delegates
B. delegates are not type safe
C. delegates provides wrappers for function pointers
D. none of the mentioned
Answer» D. none of the mentioned
383.

Choose the incorrect statement about delegates?

A. delegates are not type safe
B. delegates can be used to implement callback notification
C. delegate is a user defined type
D. delegates permits execution of a method in an asynchronous manner
Answer» B. delegates can be used to implement callback notification
384.

Which among the following differentiates a delegate in C#.NET from a conventional function pointer in other languages?

A. delegates in C#.NET represent a new type in the Common Type System
B. delegates allows static as well as instance methods to be invoked
C. delegates are type safe and secure
D. none of the mentioned
Answer» E.
385.

Which of the following is an incorrect statement about delegate?

A. a single delegate can invoke more than one method
B. delegates could be shared
C. delegates are type safe wrappers for function pointers
D. delegate is a value type
Answer» D. delegate is a value type
386.

Which among the following is the correct statement about delegate declaration ? delegate void del(int i);

A. on declaring the delegate, a class called del is created
B. the del class is derived from the MulticastDelegate class
C. the del class will contain a one argument constructor and an invoke() method
D. all of the mentioned
Answer» E.
387.

Choose the incorrect statement among the following about the delegate?

A. delegates are of reference types
B. delegates are object oriented
C. delegates are type safe
D. none of the mentioned
Answer» E.
388.

To generate a simple notification for an object in runtime, the programming construct to be used for implementing this idea?

A. namespace
B. interface
C. delegate
D. attribute
Answer» D. attribute
389.

Suppose a Generic class called as SortObjects is to be made capable of sorting objects of any type(integer, single, byte etc).Then, which of the following programming constructs is able to implement the comparison function?

A. interface
B. encapsulation
C. delegate
D. attribute
Answer» D. attribute
390.

To implement delegates, the necessary condition is?

A. class declaration
B. inheritance
C. runtime polymorphism
D. exceptions
Answer» B. inheritance
391.

The ‘ref’ keyword can be used with which among the following?

A. Static function/subroutine
B. Static data
C. Instance function/subroutine
D. All of the mentioned
Answer» B. Static data
392.

Which of the following is a type of stream in C#?

A. Integer stream
B. Character stream
C. Float stream
D. Long stream
Answer» C. Float stream
393.

Which of the following is used to perform all input & output operations in C#?

A. streams
B. Variables
C. classes
D. Methods
Answer» B. Variables
394.

Which method among the following returns the integer if no character is available?

A. int peek()
B. int read()
C. string ReadLine()
D. none of the mentioned
Answer» B. int read()
395.

Which method of character stream class returns the numbers of characters successfully read starting at count?

A. int Read()
B. int Read(char[] buffer, int index, int count)
C. int ReadBlock(char[ ] buffer, int index, int count)
D. none of the mentioned
Answer» C. int ReadBlock(char[ ] buffer, int index, int count)
396.

Which method of the character stream class returns the numbers of characters successfully read starting at index?

A. int Read()
B. int Read(char[] buffer, int index, int count)
C. int ReadBlock(char[ ] buffer, int index, int count)
D. none of the mentioned
Answer» D. none of the mentioned
397.

Which among the following classes are used to perform the character based file operations?

A. StreamReader
B. InputStream
C. OutputStream
D. All of the mentioned
Answer» C. OutputStream
398.

The advantages of using character stream based file handling are?

A. they operate directly on unicode characters
B. they operate directly on bits
C. they store unicode text
D. all of the mentioned
Answer» B. they operate directly on bits
399.

From which of these classes, the character based output stream class Stream Writer is derived?

A. TextWriter
B. TextReader
C. Character Stream
D. All of the mentioned
Answer» B. TextReader
400.

Which of these is a method used for reading bytes from the file?

A. clear()
B. ReadByte()
C. put()
D. write()
Answer» C. put()