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
Answer Posted / sarang
a and c are right.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Can struct inherit from class c#?
What is a string in c#?
Explain the difference between access specifier and access modifier in c#?
What is the use of oops in c#?
What are Indexers in C#?
What is the class in c#?
What are the advantages of interface in c#?
What is using directive in c#?
List down the reason behind the usage of c# language.
Explain manifest in c#.
Why c# is type safe?
What are the advantages of properties in c#?
Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?
What is the difference between interface and inheritance in c#?
What are the Uses of CLR