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
There were a lot of questions asked, so I will list the topic (and add a what is "topic" and know pros/cons). Extreme programming, what is a transaction, various SDLC design approaches, what is a namespace, define a good test case, what is a stored proc, webservice? design patterns? linker? compiler? access modifiers? stack vs. queue? arrays vs. linked lists? sorting algorithms? recursion? OOP principles?
How can I get around scope problems in a try/catch?
What are strongly typed objects?
What is difference between variable and property in c#?
Write a syntax for writing a event delegate.
Is lazy t thread safe?
What is the difference between constant and readonly in c#?
What is eager loading in c#?
what is inheritance and an example in vb.net and c# of when you might use it?
How does the lifecycle of Windows services differ from Standard EXE?
Is it possible to have different access modifiers on the get/set methods of a property in c#?
What is static void main in c#?
What is instantiating a class in c#?
Distinguish between array and arraylist in c#?
What is meant by desktop application?