Interfaces

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

A
Class MyClass is an abstract class.

B
Class MyClass cannot contain instance data.

C
Class MyClass fully implements the interface IMyInterface.

D
Interface IMyInterface should be inherited from the Object class.

E
The compiler will report an error since the interface IMyInterface is only partially implemented.

ANS:E -

The compiler will report an error since the interface IMyInterface is only partially implemented.

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.