Q121
Open questionSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
134
Questions
7/7
Page
Pick an option on a question to see the right answer and solution.
Q121
Open questionSelect an option to see the answer and solution.
Q122
Open questionSelect an option to see the answer and solution.
Q123
Open questionSelect an option to see the answer and solution.
Q124
Open questionstatic 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();
}Select an option to see the answer and solution.
Q125
Open questionstatic 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();
}Select an option to see the answer and solution.
Q126
Open questionSelect an option to see the answer and solution.
Q127
Open questionSelect an option to see the answer and solution.
Q128
Open questionstatic 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();
}Select an option to see the answer and solution.
Q129
Open questionstatic void main(String args[])
{
char chars[] = {'x', 'y', 'z'};
String s = new String(chars);
Console.WriteLine(s);
}Select an option to see the answer and solution.
Q130
Open questionSelect an option to see the answer and solution.
Q131
Open questionSelect an option to see the answer and solution.
Q132
Open questionclass sum
{
public int x;
public int y;
public int add (int a, int b)
{
x = a + b;
y = x + b;
return 0;
}
}
class Program
{
static void Main(string[] args)
{
sum obj1 = new sum();
sum obj2 = new sum();
int a = 2;
obj1.add(a, a + 1);
obj2.add(5, a);
Console.WriteLine(obj1.x + " " + obj2.y);
Console.ReadLine();
}
}Select an option to see the answer and solution.
Q133
Open questionstatic void Main(string[] args)
{
String c = " Hello Computer ";
String a = c.Trim();
Console.WriteLine("\"" + s + "\"");
}Select an option to see the answer and solution.
Q134
Open questionSelect an option to see the answer and solution.