41. What is the correct way to declare and initialize a jagged array with 2 rows in C#?
42. What is the correct syntax to access the second character of a string named text in C#?
43. What is the result of the expression Array.IndexOf(numbers, 5) where numbers = {1, 2, 3, 4, 5} in C#?
44. In C#, which method is used to split a string into substrings based on a specified delimiter?
45. What is the correct way to declare and initialize a multidimensional array with 3 rows and 4 columns in C#?
46. Which of these methods of class String is used to extract all the characters from a String object?
47. What will be the output of the following C# code?
class math
{
public int a,b;
public math(int i, int j)
{
a = i;
b = j;
}
public void sum(math m)
{
m.a *= 2;
m.b += 2;
}
}
class Program
{
static void Main(string[] args)
{
math t = new math(20, 10);
t.sum(t);
Console.WriteLine(t.a + " " + t.b);
Console.ReadLine();
}
}
class math
{
public int a,b;
public math(int i, int j)
{
a = i;
b = j;
}
public void sum(math m)
{
m.a *= 2;
m.b += 2;
}
}
class Program
{
static void Main(string[] args)
{
math t = new math(20, 10);
t.sum(t);
Console.WriteLine(t.a + " " + t.b);
Console.ReadLine();
}
}
48. Which of these base classes are accessible to the derived class members?
49. What is the process by which we can control parts of a program that can access the members of a class?
50. Which of these methods of class are used to remove the leading and backward whitespaces?
Read More Section(Arrays and Strings in C Sharp)
Each Section contains maximum 100 MCQs question on Arrays and Strings in C Sharp. To get more questions visit other sections.