Interview Questions

This is a list of all frequently asked Programming Interview Questions with Answers I have gathered from other sources and created myself.
Please feel free to post feedback to challenge, improve, or suggest new questions.

Does C# support multiple-inheritance?
No, only multiple interface inheritance

Who is a protected class-level variable available to?
It is available to any sub-class (a class inheriting this class).

Describe the accessibility modifier “protected internal”.
It is available to classes that are within the same assembly and derived from the specified base class. C# Protected Internal Example

What does the term immutable mean?
The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.

What’s the difference between System.String and System.Text.StringBuilder classes?
System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

Can you store multiple data types in System.Array?
No. But you can store objects which will allow you to store any data type (boxed of course)

How can you overload a method?
Different parameter data types, different number of parameters, different order of different data type parameters.

What’s an abstract class?
A class that cannot be instantiated and can be only inherited by other class.

Can you prevent your class from being inherited and becoming a base class for some other classes?
Yes, just use the “sealed” keyword in the class definition.

Can you declare the override method static while the original method is non-static?
No, the signature of the virtual method must remain the same, only the keyword “virtual” is changed to keyword “override”.

* This page is not finished yet. Please come back in a few days.

VN:F [1.9.3_1094]
Rating: 4.6/5 (5 votes cast)
Interview Questions, 4.6 out of 5 based on 5 ratings

  • DZone
  • Digg
  • Twitter
  • Yahoo Buzz
  • StumbleUpon
  • Delicious
  • Technorati Favorites
  • LiveJournal
  • Reddit
  • Share/Bookmark
  1. No comments yet.
  1. July 5th, 2009 at 14:01 | #1
  2. March 24th, 2010 at 10:42 | #2

Subscribe without commenting

SEO Powered by Platinum SEO from Techblissonline
watch free movies