Sunteți pe pagina 1din 4

1) Does C# support multiple-inheritance?

a) yes b) No c)both
2) What’s the top .NET class that everything is derived from?

a) System b) System. Object c) Both D) none

3) What is boxing?

a) Encapsulating an object in a value type.

b) Encapsulating a copy of an object in a value type.

c) Encapsulating a value type in an object.

d) Encapsulating a copy of a value type in an object

4) What is a delegate?

1. A strongly typed function pointer.


2. A light weight thread or process that can call a single method.
3. A reference to an object in a different process.
4. An inter-process message channel.

5) How does assembly versioning in .NET prevent DLL Hell?

1. The runtime checks to see that only one version of an assembly is on the machine
at any one time.
2. .NET allows assemblies to specify the name AND the version of any assemblies
they need to run.
3. The compiler offers compile time checking for backward compatibility.
4. It doesn’t.

6) In Object Oriented Programming, how would you describe encapsulation?

1. The conversion of one type of object to another.


2. The runtime resolution of method calls.
3. The exposition of data.
4. The separation of interface and implementation

7) Find the wrong statement about structure


1, it’s a user defined value type
2, it can’t hold null value
3, it is similar to class and it can be extendable.
4, it is placed on stack memory area
8) Which is not a component of C L R?
1. Common type system
2. Common language specification
3. Base class libraries
4. Garbage collector
9) Match the following?

1. Thread start a. system. Reflection


2. Method info b. system. Attribute
3. Attribute usage c. system.Io
4. Stream write d. system. Threading

1. 1-a, 2-b, 3-c, 4-d 2.1-c, 2-a, 3-b, 4-d


2. 1-d, 2-a, 3-b, 4-c 4.1-d, 2-c, 3-a, 4-b

10) Match the following

1. Virtual a. method contains definition only

2. abstract b. used to create an instance dynamically

3. new c. used to give new functionality for a method in derived class

4. Override d. method can have functionality and can be extended

1. 1-a, 2-b, 3-c, 4-d 2.1-c, 2-a, 3-b, 4-d


2. 1-d, 2-a, 3-b, 4-c 4.1-d, 2-c, 3-a, 4-b

11) find the correct statement about value type

1. value types can hold null values


2. value types are placed on stack memory area
3. value types can be extendable
4. value type variables can be garbage collected
12) what is extension of strong name key file name

1. .dll 2. .snk 3. .exe 4. .cs


13) Find the wrong statement about operator overloading

1. the method should be static


2. the method should use operator keyword
3. the method can return void
4. For binary operator we must pass two arguments.
14) find the wrong statement about shared assemblies
1. it must have unique id before placing it on to gac
2. unique id must be registered to the assemblyinfo.cs file
3. it must placed on gac using gacutil.exe
4. it must be registered to OS in order to consume it from another
application.
15) match the following

1.method overloading a. method that cant be extended


2.method overriding b. methods having same name with different signature
3.new method c. methods having same name and signature
4.sealed method d. hides the base class method

1. 1-a, 2-b, 3-c, 4-d 2.1-b, 2-c, 3-d, 4-a


2. 1-c, 2-b, 3-a, 4-d 4.1-d, 2-c, 3-a, 4-b

16) After compiling int will be converted to

1. System.int16 2.system.int32 3.system.int64 4.system.int128

17) By using Reflection concept we can read metadata (YES / NO) :

18) Attributes add metadata to an assembly (YES / NO):

19) To create user defined exception we need to extended either


1. System. Exception 2. system.applicatonexception
3. Both 4 none

20) which of the following option about implementing polymorphism is NOT true
a)you can implement polymorphism by implementing an interface
b) you can implement polymorphism by encapsulation
c) you can implement polymorphism by using abstract classes
d) you can also achieve polymorphism by inheritance.

21) consider the following statements


Statement A: in dynamic polymorphism appropriate methods of a program can be
invoked.
Statement B : in early binding , function calls are bound at run time.

a. statement A is true and statement B is false.


b. statement A is false and statement B is true.
c. Both statements are true.
d. Both statements are false
22) which of the following is true about abstract class

a. an abstract class defines properties common to the classes derived from it.
b. An abstract class can be declared as final.
c. Abstract class cannot be extended.
d. Classes declared using the abstract keyword can be instatiated.

23) consider the following code.

Interface a
{
Void b;
}
Class c
{
Void a.b() {}
}
Which of the following statement generates the compilation error in preceding code ?

a) interface a
b) void b()
c) void a.b() {}
d) class c

24) consider the following statements :

Statement A : named parameters are used to specify essential information of an attribute.

Statement B : positional parameters are used to convey optional information in an


attribute.

a. statement A is true and statement B is false.


b. statement A is false and statement B is true.
c. Both statements are true.
d. Both statements are false
25) match the following delegate concept with there implementation

Delegate implementation syntax

1. declare the delegate testdelegate var = new testdelegate(func);


2. instantiate the delegate public delegate void testdelegate(string arg)
3. using delegate testdelegate(“test”)

S-ar putea să vă placă și