a) System.Array b) System.char c) System.String d) None of the mentioned Answer: c Explanation: String is an ...
View QuestionWhich of the following string() method are used to compare two strings with each other?
a) CopyTo() b) Copy() c) Compare() d) CompareTo() Answer: d Explanation: CompareTo()
View QuestionChoose selective differences between an array in c# and array in other programming languages.
a) Declaring array in C# the square bracket([]) comes after the type but not after identifier b) It ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
Program p = new Program();
p.display(2, 3, 8);
int []a = { 2, 56, 78, 66 };
Console.WriteLine(“example of array”);
Console.WriteLine(“elements added are”);
p.display(a);
Console.ReadLine();
}
public void display(params int[] b)
{
foreach (int i in b)
{
Console.WriteLine(“ARRAY IS HAVING:{0}”, i);
}
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View Question
Which statement is correct about following C# code?
int[, ]a={{5, 4, 3},{9, 2, 6}};
Which statement is correct about following C# code? int[, ]a={{5, 4, 3},{9, 2, 6}}; a) a’ represents 1-D ...
View QuestionWhat is the advantage of using 2D jagged array over 2D rectangular array?
a) Easy initialization of elements b) Allows unlimited elements as well as rows which had ‘0’ or are ...
View Question
Which statement is correct about following c#.NET code?
int[] a= {11, 3, 5, 9, 6};
Which statement is correct about following c#.NET code? int[] a= {11, 3, 5, 9, 6}; a) a’ is ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
double a = 345.09;
byte c = (byte) a;
Console.WriteLine(c);
Console.ReadLine();
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View Question
What will be the output of the following C# code?
{
char A = ‘K’;
char B = Convert.ToChar(76);
A++;
B++;
Console.WriteLine(A+ ” ” +B);
Console.ReadLine();
}
What will be the output of the following C# code? { char ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
int i, j;
int[, ] arr = new int[ 3, 3];
for (i = 0; i < 3; ++i)
{
for (j = 0; j < 3; ++j)
{
arr[i, j] = i * 2 + i * 2;
Console.WriteLine(arr[i, j]);
}
Console.ReadLine();
}
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View Question