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 / niloy roy

Only a is the right

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is char * null terminated?

499


What are partial classes and use of partial classes?

509


Is type nullable c#?

497


What is a class in unity?

464


What is namespace in oops?

469






In the page load event I assigned dropdownlist’s datasource property to a valid list. On the submit button click.. The same datasource property is coming as null. Why?

440


What is jit (just in time)?

532


Can we override interface method?

501


Why is c# used?

463


Why do we need properties in c#?

474


Can you prevent a class from being instantiated?

571


Explain states of a thread in c#?

505


Why do I get a "cs5001: does not have an entry point defined" error when compiling?

489


What all details the assembly manifest will contain?

414


What is difference between override and new in c#?

490