Consider the following pieces of C# code:

a. interface I1 {/*......*/}
interface I2 {/*......*/}
struct Point : I1,I2 {/* ..... */}

b. struct Book{
int bookId;
struct Book b;
}

c. using M=Mystruct;
struct MyStruct{
int id;
}
class MyClass{
static void Main(string[] args){
M m = new M();
}
}

d. struct Sample{
Sample ref x;
}

Which of the above are correct?
Choose one of the options below.
a, c and d are right
a only right
a and c are right
d only wrong
None of the listed options

Answers were Sorted based on User's Feedback



Consider the following pieces of C# code: a. interface I1 {/*......*/} inte..

Answer / niloy roy

Only a is the right

Is This Answer Correct ?    1 Yes 0 No

Consider the following pieces of C# code: a. interface I1 {/*......*/} inte..

Answer / sarang

a and c are right.

Is This Answer Correct ?    1 Yes 2 No

Consider the following pieces of C# code: a. interface I1 {/*......*/} inte..

Answer / b2balaji

shall u give reason for this answer?

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Sharp Interview Questions

How does bitwise work?

0 Answers  


What is the difference between c and c# programming?

0 Answers  


What is the use of thread join in c#?

0 Answers  


1. What is lazy loading? 2. What is delay signing? 3. How to transfer view object to presenter in MVP? 4. How to create a generic class? 5. What is Ajax object? 6. What is explicit interface implementation? 7. I1, I2 interfaces have same methods (say PrintName) explicitly implemented in class C1. Now how to call PrintName method from I1? 8. I have a list of Customers. List the customer with maximum orders using LINQ.

1 Answers   Aptron, Volvo,


Which namespaces are necessary to create a localized application?

0 Answers   MindCracker,






What is abstract class ?

5 Answers   Digital GlobalSoft,


Where do we use serialization in c#?

0 Answers  


What?s the difference between the System.Array.CopyTo() and System.Array.Clone()?

3 Answers  


Is nullable type c#?

0 Answers  


what are some characteristics of an array?

0 Answers  


Where is the output of TextWriterTraceListener redirected?

1 Answers   Rolta, Siebel Systems,


How to Show Message box in Metro Style App?

0 Answers   PUCIT,


Categories