Placement papers on Csharp - Set 5

Placement papers on Csharp - Set 5


1. Inheriting from a base class and providing a new method for one of the base class methods

Overriding
Overloading
Shadowing
Abstracting
View Answer / Hide Answer

ANSWER: Overriding




2. It contains all the information needed to describe the assembly to the common language runtime.

Bootstrapper
Assembly manifest
GAC
Strong Name
View Answer / Hide Answer

ANSWER: Assembly manifest




3. Convert.ToInt32 and Int.Parse?

Both are Same
Int.Parse can't handle Null values , It will throw ArgumentNullException Error
Convert.ToInt32 can't handle Null Values ,it will throws ArgumentNullException error
Both can handle Null values
View Answer / Hide Answer

ANSWER: Int.Parse can't handle Null values , It will throw ArgumentNullException Error




4. Which of the following class cannot be inherited?

Sealed
Abstract
Both
None
View Answer / Hide Answer

ANSWER: Sealed




5. Does C# support multiple-inheritance?

No. But you can use Interfaces
Yes
View Answer / Hide Answer

ANSWER: No. But you can use Interfaces




6. What is the advantage of using System.Text.StringBuilder over System.String?

StringBuilder is more efficient in cases where there is a large amount of string manipulation
StringBuilder creates a new instance in memory, each time a string is changed
Both a and b are correct
View Answer / Hide Answer

ANSWER: StringBuilder is more efficient in cases where there is a large amount of string manipulation




7. When do you absolutely have to declare a class as abstract?

When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden.
When at least one of the methods in the class is abstract.
Both a and b are correct
View Answer / Hide Answer

ANSWER: Both a and b are correct




8. What are the different ways a method can be overloaded?

Different parameter data types
Different number of parameters
Different order of parameters
All of the above
View Answer / Hide Answer

ANSWER: All of the above




9. Which of the following can't be used in our .NET application?

.Net assemblies
ActiveX control
COM type libraries
All of the above can be used
View Answer / Hide Answer

ANSWER: All of the above can be used




10. Type of code security that protects system resources from unauthorized calls

Role-based security
Code-based security
View Answer / Hide Answer

ANSWER: Code-based security



Post your comment