C# Programming - Interfaces

Why should I learn to solve C# Programming questions and answers section on "Interfaces"?

Learn and practise solving C# Programming questions and answers section on "Interfaces" to enhance your skills so that you can clear interviews, competitive examinations, and various entrance tests (CAT, GATE, GRE, MAT, bank exams, railway exams, etc.) with full confidence.

Where can I get the C# Programming questions and answers section on "Interfaces"?

IndiaBIX provides you with numerous C# Programming questions and answers based on "Interfaces" along with fully solved examples and detailed explanations that will be easy to understand.

Where can I get the C# Programming section on "Interfaces" MCQ-type interview questions and answers (objective type, multiple choice)?

Here you can find multiple-choice C# Programming questions and answers based on "Interfaces" for your placement interviews and competitive exams. Objective-type and true-or-false-type questions are given too.

How do I download the C# Programming questions and answers section on "Interfaces" in PDF format?

You can download the C# Programming quiz questions and answers section on "Interfaces" as PDF files or eBooks.

How do I solve C# Programming quiz problems based on "Interfaces"?

You can easily solve C# Programming quiz problems based on "Interfaces" by practising the given exercises, including shortcuts and tricks.

Exercise : Interfaces - General Questions
  • Interfaces - General Questions
1.
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.
MyClass is an abstract class.
The definition of fun1() in class MyClass should be void IMyInterface.fun1().
Answer: Option
Explanation:
No answer description is available. Let's discuss.

2.
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
Explanation:
No answer description is available. Let's discuss.

3.
A class implements two interfaces each containing three methods. The class contains no instance data. Which of the following correctly indicate the size of the object created from this class?
12 bytes
24 bytes
0 byte
8 bytes
16 bytes
Answer: Option
Explanation:
No answer description is available. Let's discuss.

4.
Which of the following statements is correct about an interface used in C#.NET?
One class can implement only one interface.
In a program if one class implements an interface then no other class in the same program can implement this interface.
From two base interfaces a new interface cannot be inherited.
Properties can be declared inside an interface.
Interfaces cannot be inherited.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

5.
Which of the following statements is correct about Interfaces used in C#.NET?
All interfaces are derived from an Object class.
Interfaces can be inherited.
All interfaces are derived from an Object interface.
Interfaces can contain only method declaration.
Interfaces can contain static data and methods.
Answer: Option
Explanation:
No answer description is available. Let's discuss.