1.  Which of the following statements are correct about an interface used in C#.NET ?
1. An interface can contain properties, methods and events.
2. The keyword must implement forces implementation of an interface.
3. Interfaces can be overloaded.
4. Interfaces can be implemented by a class or a struct.
5. Enhanced implementations of an interface can be developed without breaking existing code.


1, 2
1, 4, 5
3, 4
3 only


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

2.  Which of the following statements are correct about an interface in C#.NET ?
1. A class can implement multiple interfaces.
2. Structures cannot inherit a class but can implement an interface.
3. In C#.NET, : is used to signify that a class member implements a specific interface.
4. An interface can implement multiple classes.
5. The static attribute can be used with a method that implements an interface declaration.


1, 2, 3
2, 4
3, 5
None of the above


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

3.  Which of the following can be declared in an interface ?
1. Properties
2. Methods
3. Enumerations
4. Events
5. Structures


1, 3
1, 2, 4
3, 5
4, 5


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

4.  A class consists of two interfaces with each interface consisting of three methods.The class had no instance data. Which of the following indicates the correct size of object created from this class ?


12 bytes
16 bytes
0 bytes
24 bytes


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

5.  Which of the following statements is correct about the C#.NET code snippet given below ?
interface IMyInterface
{
void fun1();
int fun2();
}
class MyClass: IMyInterface
{
void fun1()
{ }
int IMyInterface.fun2()
{ }
}


A function cannot be declared inside an interface.
A subroutine cannot be declared inside an interface.
A Method Table will not be created for class MyClass.
The definition of fun1() in class MyClass should be void IMyInterface.fun1().


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report