Q101
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
6/7
Page
Pick an option on a question to see the right answer and solution.
Q101
Open questionSelect an option to see the answer and solution.
Q102
Open questionSelect an option to see the answer and solution.
Q103
Open questionclass Program
{
static void Main(string[] args)
{
String c = "i love Csharp";
bool a;
a = c.StartsWith("I");
Console.WriteLine(a);
Console.ReadLine();
}
}Select an option to see the answer and solution.
Q104
Open questionclass Program
{
static void Main(string[] args)
{
int i = 5;
int j;
method1(ref i);
method2(out j);
Console.writeline(i + " " + j);
}
static void method1(ref int x)
{
x = x + x;
}
static void method2(out int x)
{
x = 6;
x = x * x;
}
}Select an option to see the answer and solution.
Q105
Open questionOptions are not available for this question.
Select an option to see the answer and solution.
Q106
Open questionSelect an option to see the answer and solution.
Q107
Open questionSelect an option to see the answer and solution.
Q108
Open questionstatic void main(string[] args)
{
int n = 1;
method(n);
console.Writeline(n);
method1(ref n);
console.Writeline(n);
}
static void method(int num)
{
num += 20;
console.writeline(num);
}
static void method1(ref int num)
{
num += 20;
console.writeline(num);
}Select an option to see the answer and solution.
Q109
Open questionstatic void Main(string[] args)
{
String c = "Hello";
String a = c + "Bye";
Console.WriteLine(a);
Console.ReadLine();
}Select an option to see the answer and solution.
Q110
Open questionstatic void Main(string[] args)
{
char A = 'K';
char B = Convert.ToChar(76);
A++;
B++;
Console.WriteLine(A+ " " +B);
Console.ReadLine();
}Select an option to see the answer and solution.
Q111
Open questionstatic void Main(string[] args)
{
int [] a = {1, 2, 3, 4, 5};
fun(a);
Console.ReadLine();
}
static void fun(params int[] b )
{
int[] k = { 3, 4, 7, 8,'\0' };
for (int i = 0; i < b.Length; i++)
{
b[i] = b[i] + k[i] ;
Console.WriteLine( b[i] + " ");
}
}Select an option to see the answer and solution.
Q112
Open questionSelect an option to see the answer and solution.
Q113
Open questionint[] a= {11, 3, 5, 9, 6};Select an option to see the answer and solution.
Q114
Open question static void Main(string[] args)
{
int[] a = { 2, 21, 34, 46, 85, 88, 90};
fun(a);
Console.WriteLine(a + " ");
Console.ReadLine();
}
static void fun(params int [] b )
{
int [] c = { 1, 2, 3, 4, 5, 6, 7};
int i ;
for (i = 0 ;i < b.Length ;i++)
if (b[i] % 2 == 0)
{
c[i] = b[i];
}
Console.WriteLine("even numbers are:");
for (i = 0 ;i <= b.Length ;i++)
{
Console.WriteLine(c[i]);
}
}Select an option to see the answer and solution.
Q115
Open questionSelect an option to see the answer and solution.
Q116
Open questionstatic void Main(string[] args)
{
int a = 5;
int b = 0, c = 0;
method (a, ref b, ref c);
Console.WriteLine(b + " " + c);
Console.ReadLine();
}
static int method(int x, int p, ref int k)
{
p = x + x * x;
k = x * x + p;
return 0;
}Select an option to see the answer and solution.
Q117
Open questionSelect an option to see the answer and solution.
Q118
Open questionSelect an option to see the answer and solution.
Q119
Open questionSelect an option to see the answer and solution.
Q120
Open questionSelect an option to see the answer and solution.