adplus-dvertising

Welcome to the Arrays and Strings MCQs Page

Dive deep into the fascinating world of Arrays and Strings with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Arrays and Strings, a crucial aspect of C# Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Arrays and Strings, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C# Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Arrays and Strings. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C# Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Arrays and Strings. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Arrays and Strings MCQs | Page 6 of 16

Explore more Topics under C# Programming

Q51.
Which of these operators can be used to concatenate two or more String objects?
Discuss
Answer: (a).+
Q52.
The Method use to remove white space from string?
Discuss
Answer: (c).Trim()
Q53.
What is the String in C# meant for?
Discuss
Answer: (c).Object
Discuss
Answer: (b).We cannot modify characters contained in the string
Q55.
To perform comparison operation on strings supported operations are :
Discuss
Answer: (d).All of the mentioned
Q56.
What will be output of the following set of code :
static void Main(string[] args)
 {
     string s1 = "Hello I Love Csharp ";
     Console.WriteLine(Convert.ToChar( (s1.IndexOf('I') - s1.IndexOf('l')) * s1.IndexOf('p'));
     Console.ReadLine();
 }
Discuss
Answer: (d).H
Q57.
Correct way to convert a string to uppercase using string class method()?
Discuss
Answer: (c).Object.ToUpper()
Q58.
What would be the output for the following set of code?
static void Main(string[] args)
 {
     String obj = "hello";
     String obj1 = "world";   
     String obj2 = obj;
     Console.WriteLine (obj.Equals(obj2) + "  " + obj2.CompareTo(obj) );
     Console.ReadLine();
 }
Discuss
Answer: (c).True 0
Q59.
What would be the output for the code below?
static void Main(string[] args)
 {
     String obj = "hello";
     String obj1 = "world";   
     String obj2 = obj;
     Console.WriteLine(obj + "  " + obj1);
     string s = obj + "  " + obj1;
     Console.WriteLine(s.Length);
     Console.ReadLine();
 }
Discuss
Answer: (c).hello world
11
Q60.
What is output for the following set of Code?
static void Main(string[] args)
 {
     String obj = "hello";
     String obj1 = "world";   
     String obj2 = obj;
     string s = obj+" "+obj1;
     Console.WriteLine(s.IndexOf('r'));
     Console.ReadLine();
 }

a.

7

b.

8

c.

9

d.

10

Discuss
Answer: (b).8

Suggested Topics

Are you eager to expand your knowledge beyond C# Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!