ExamVeda
Login
Home
21
What is the String in C# meant for?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
22
Which of these operators can be used to concatenate two or more String objects?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
23
Which of these is used as a default specifier for a member of the class if no access specifier is used for it?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
24
What will be the output of the following C# code?
static void Main(string[] args)
{
    string s1 = " Cshr ";
    string s2 = s1.Insert(3 , " a ");
    string s3 = s2.Insert(5 , " p ");
    for (int i = 0;i < s3.Length; i++)
    Console.WriteLine(s3[i]);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
25
What will be the output of the following C# 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 & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
26
The method in which large or variable number of arguments are handled is known as . . . . . . . .
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
27
Which among the following is the correct way to find out the index of second 's' in the string "She sold her beauty in one night to someone else"?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
28
What will be the output of the following C# code?
static void Main(string[] args)
{
    string s1 = "Hello";
    string s2 = "hello";
    if (s1 == s2)
    Console.WriteLine("Equal");
    else
    Console.WriteLine("Unequal");
    if (s1.Equals (s2))
    Console.WriteLine("Equal");
    else
    Console.WriteLine("Unequal");
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
29
What will be the output of the following C# code snippet?
static void main(String args[])
{
    char chars[] = {'x', 'y', 'z'};
    String s = new String(chars);
    Console.WriteLine(s);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
30
Choose the statements which are false in nature?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board