Wednesday, June 10, 2009

C# InterviewQuestions- Part 6

Interview Questions
---------------------------
51. What are the types of strings?
a ) 2 types
1. mutable strings
2. immutable strings

52. Is a string is a reference type or value type?
a ) A string is reference type

53. What do you mean by mutable and immutable ?
a ) Mutable means we can alter the characters contained in them.
Immutable means that we can not alter the characters contained in them

54. What are String and StringBuilder classes?
a ) String class is an immutable class and
StringBuilder class is an mutable class

55. Tell me some methods present in StringBuilder class?
a ) They are
Append(),
Insert(),
Remove(),
Replace(),
appendFormat()

56. What is the namespace of StringBuilder class?
a ) System.Text

57. Tell me some methods present in String class?
a ) They are
Copy(),
Equals(),
ConCat(),
Compare(),
Trim(),
Substring(),

58. Can you store multiple data types in System.Array ?
a ) No.

59. What is the class from which an array is created(derived) automatically in c#
a ) System.Array

60. Some common methods of System.Array class?
a ) Clear(), CpoyTo(), GetValue(), Sort(), Reverse() etc.

1 comment:

Unknown said...

Its funny how a lot of developers will get these questions right, but ask them a simple logic question and they will be unable to reply.

--funispower.com