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 datagridview in c#?

0 Answers  


What are the main reasons to use c# language?

0 Answers  


What is namespace give the example?

0 Answers  


What are the fundamental differences between value types and reference types?

0 Answers  


How do I port "synchronized" functions from visual j++ to c#?

0 Answers  






What is concrete class in c#?

0 Answers  


What is jit? What are the different types of jit?

0 Answers  


Explain data types in c#?

0 Answers  


1.write a program in C# to find a given point which is inside in a circle. Given circle's radius and its center point? 2.Write a program in C# to generated 20 prime numbers greater than a given number? (It should be more efficient for large numbers also) 3. Write a Code to check whether a given point is inside a circle or not? given Circle's raduis and its center point. 4. using oops concept, design an elevator do not forget buttons on each floor..

2 Answers  


What are c# i/o classes? What are the commonly used i/o classes?

0 Answers  


Is c sharp and c# are same?

0 Answers  


what is a destructor?

0 Answers   Amazon,


Categories