Explore topic-wise MCQs in C# Questions & Answers Basic Operation on Strings.

This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your C# Questions & Answers Basic Operation on Strings knowledge and support exam preparation. Choose a topic below to get started.

1.

The Method use to remove white space from a string?

A. Split()
B. Substring()
C. Trim()
D. TrimStart()
Answer» D. TrimStart()
2.

Correct way to find if contents of two strings are equal?

A. if (s1 = s2)
B. if (s1 != s2)
C. if (strcmp (s1 ,s2))
D. if ( s1 is s2)
Answer» D. if ( s1 is s2)
3.

Choose the base class for string() method:

A. System.Array
B. System.char
C. System.String
D. None of the mentioned
Answer» D. None of the mentioned