Thursday, July 2, 2009

C# InterviewQuestions- Part 8

Interview Questions
-----------------------------

71. Can we declare an abstract method in non abstract class?
a ) No. it can declared only in abstract classes

72. Can we use static or virtual keywords to an abstract method?
a ) No

73. Can an interface extend a class?
a ) No. it can’t extend classes.

74. Is it necessary that the direct base class of a derived class must be at least as accessible as the derived class itself?
a ) Yes.

75. What is the keyword that is used to invoke the constructor method of the super class?
a ) It is the keyword “base”.

76. What is an enumeration?
a ) An enumeration is a user-defined integer type which provides a way for attaching names to numbers.

77. What is boxing?
a ) Conversion of value type to object type (reference type) is known as boxing

78. What is unboxing?
a ) Conversion of object type to value type is known as unboxing.

79. What are the categories of variables that are automatically initialized to their default values?
a ) They are
1. Static variables
2. Instance variables
3. Array elements

80. What is the scope of a variable?
a ) Scope of a variable is the region of code with in which the variable can be accessed.

1 comment:

YSNY said...

Should be helpfull for C# developers.

http://billingpracticemanagementblog.realpracticesolutions.com