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

What is the difference between class and abstract class?

9 Answers  


example of uniary operators and binary operators

0 Answers  


How do you implement multiple inheritance in .NET?

10 Answers   Microsoft,


What is architecture of your poroject? how i c an say?

2 Answers   HCL, Phoenix Technologies, Eminosoft,


How do you generate documentation from the C# file commented properly with a command-line compiler?

1 Answers  






what is dynamic sql

2 Answers   TCS, Wipro,


How u call destructor and dispose methode in c#.NET

1 Answers  


Types of polymerphism and explain about dynamic polymerphism?

5 Answers  


How can we give strong name to assembly? What is satellite assembly?

2 Answers   SMNetserv,


How to run the program at particular time? It should run everyday at 3:00 PM. After executing the program should sleep until next day at 3:00 PM. Please explain with code?

5 Answers   Wipro, Sanat,


Explain manifest & metadata?

5 Answers   IBM, Wipro,


what are the different ways to cleaning up objects?

2 Answers   Wipro,






Categories