Академический Документы
Профессиональный Документы
Культура Документы
Multiple
Multi-level
Single
Hierarchical
2. The ________ keyword allows you to access the variables and methods of the base class
from the derived class
super
this
base
parent
4. The instance of the derived class will always first invoke the _________ of the base class
Destructor
Constructor
Method
Abstract method
5. ______________ a method in the derived class can change the body of the method that
was declared in the base class
Shadowing
Overloading
Overriding
Implementation
6. _______ is a keyword used to declare a method in the base class that can be overridden
by the derived class
override
virtual
abstract
anonymous
7. The ________ keyword prevents a class from being inherited by any other class.
sealed
final
abstract
static
8. compile time polymorphism referred to as _______
static polymorphism
dynamic polymorphism
default polymorphism
runtime polymorphism
A, B, D
B, D
A, C
B, E
10. ____________ allows you to create a new class from another class, thereby inheriting
its common properties and methods
Abstraction
Encapsulation
Inheritance
Polymorphism
11. It is not mandatory for the abstract class to contain only abstract methods.
True
False
13. In C#, by default, all members declared in an interface have _______ as the access
modifier
private
public
protected
internal
14. ________ cannot contain constants, data fields, constructors, destructors, and static
members.
Abstract classes
Sealed classes
Static classes
Interfaces
15. The ___ and ____ operators in C# verify whether the specified interface is implemented
or not.
this, base
is, as
is, this
as, base
16. Which of these statements about abstract classes and abstract methods are true?
(A) An abstract class can be declared using the declare keyword.
(B) An abstract class cannot be instantiated using the new keyword.
(C) An abstract class can be created by declaring and defining methods.
(D) An abstract method can be declared without an access modifier.
(E) An abstract method can be implemented in the inheriting class using the override
keyword.
A, B, D
B, C, D
A, C
B, E
A, B, D
C, D
A, C
B, E
18. 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
A
B
C
D
19. Select the namespace which should be included while making use of LINQ operations:
A. System.Tex
B. System.Collections.Generic
C. System.Linq
D. None of the mentioned
A
B
C
D
22. What is the process of defining a method in terms of itself, that is a method that calls
itself?
a) Polymorphism
b) Abstraction
c) Encapsulation
d) Recursion
23. The process of defining a method in a subclass having same name & type signature as a
method in its superclass is known as?
a) Method overloading
b) Method overriding
c) Method hiding
d) None of the mentioned
24. Which of the given modifiers can be used to prevent Method overriding?
a) Static
b) Constant
c) Sealed
d) final
26. When we call a constructor method among different given constructors. We match the
suitable constructor by matching the name of constructor first, then the number and
then the type of parameters to decide which constructor is to be overloaded. The
process is also known as?
a) Method overriding
b) Inheritance
c) Polymorphism
d) Encapsulation
28. Which among the following are the advantages of using indexers?
a) To use collection of items at a large scale we make use of indexers as they utilize
objects of class that represent the collection as an array
b) Indexers are also convenient as they can also make use of different types of indexers
like int, string etc
c) An indexer allows an object to be indexed such as an array
d) All of the mentioned
29. Choose the correct option among the following indexers which correctly allows to index
in same way as an array?
a) A class
b) An interface
c) A function
d) A property
31. Consider a class maths and we had a property called as sum.b which is the reference to
a maths object and we want the statement Console.WriteLine(b.sum) to fail. Which
among the following is the correct solution to ensure this functionality?
a) Declares sum property with only get accessor
b) Declares sum property with only set accessor
c) Declares sum property with both set and get accessor
d) Declares sum property with both set, get and normal accessor
35. Which of these clauses will be executed even if no exceptions are found?
a) throws
b) finally
c) throw
d) catch
37. Which of these exceptions will occur if we try to access the index of an array beyond its
length?
a) ArithmeticException
b) ArrayException
c) ArrayArguementException
d) IndexOutOfRangeException
38. Which of these classes is related to all the exceptions that are explicitly thrown?
a) Error
b) Exception
c) Throwable
d) Throw
41. 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
42. Which of these methods of Thread class is used to Suspend a thread for a period of
time?
a) sleep()
b) terminate()
c) suspend()
d) stop()
43. Which method is called when a thread is blocked from running temporarily?
a) Pulse()
b) PulseAll()
c) Wait()
d) Both Pulse() & Wait()