nerdexam
GIAC

GSSP-NET · Question #236

Smith works as a Software Developer for ABC Inc. He creates an application using Visual Studio .NET 2005. The application displays "Welcome to ABC" on the top-left corner of a form. He writes the…

The correct answer is C. To create dynamic or mutable strings. See the full explanation below for the reasoning.

Question

Smith works as a Software Developer for ABC Inc. He creates an application using Visual Studio .NET 2005. The application displays "Welcome to ABC" on the top-left corner of a form. He writes the following code:

StringBuilder strbuild1 = new StringBuilder(20); strbuild1.Append("'Welcome"); strbuild1.Append(" "); strbuild1.Append("to"); strbuild1.Append(" "); strbuild1.Append("ABC'"); string str1 = strbuild1.ToString(); Console.WriteLine(str1); Console.ReadLine(); What is the main purpose of using StringBuilder object in the application?

Options

  • ATo append a specified string to the end of the StringBuilder object.
  • BTo concatenate two or more different set of strings or a set of Unicode characters.
  • CTo create dynamic or mutable strings.
  • DTo convert a value of the StringBuilder object to the String object.

How the community answered

(33 responses)
  • A
    15% (5)
  • B
    3% (1)
  • C
    73% (24)
  • D
    9% (3)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice