string s1 = " I AM BEST ";
string s2;
s2 = s1.substring (5, 4);
Console.WriteLine (s2);Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
115
Questions
5/6
Page
Pick an option on a question to see the right answer and solution.
string s1 = " I AM BEST ";
string s2;
s2 = s1.substring (5, 4);
Console.WriteLine (s2);Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
class Program
{
static void Main(string[] args)
{
int i ;
for ( i = 0; i < 5; i++)
{
int j = 0;
j += i;
Console. WriteLine(j);
}
Console. WriteLine(i);
Console. ReadLine();
}
}Select an option to see the answer and solution.
static void Main(string[] args)
{
char c = 'g';
string s = c.ToString();
string s1 = "I am a human being" + c;
Console.WriteLine(s1);
Console.ReadLine();
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
static void Main(string[] args)
{
int a = 22;
long b = 44;
double c = 1.406;
b = a;
c = a;
a = b;
b = c;
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
static void Main(string[] args)
{
const int a = 5;
const int b = 6;
for (int i = 1; i <= 5; i++)
{
a = a * i;
b = b * i;
}
Console.WriteLine(a);
Console.WriteLine(b);
Console.ReadLine();
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
static void Main(string[] args)
{
string Name = "He is playing in a ground.";
char[] characters = Name.ToCharArray();
StringBuilder sb = new StringBuilder();
for (int i = Name.Length - 1; i >= 0; --i)
{
sb.Append(characters[i]);
}
Console.Write(sb.ToString());
Console.ReadLine();
}Select an option to see the answer and solution.
static void Main(string[] args)
{
String name = "Dr.Gupta";
Console.WriteLine("Good Morning" + name);
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
static void Main(string[] args)
{
char a = 'A';
string b = "a";
Console.WriteLine(Convert.ToInt32(a));
Console.WriteLine(Convert.ToInt32(Convert.ToChar(b)));
Console.ReadLine();
}Select an option to see the answer and solution.
Static Void Main(String[] args)
{
const int m = 100;
int n = 10;
const int k = n / 5 * 100 * n ;
Console.WriteLine(m * k);
Console.ReadLine();
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Q100
Open questionclass Program
{
public static void Main(string[] args)
{
int i, j;
i = (j = 5) + 10;
Console. WriteLine(i);
Console. WriteLine(j);
Console. ReadLine();
}
}Select an option to see the answer and solution.