What will be the output of the following C# code? static void Main(string[] args) { ...
View QuestionHow many values does a function return?
a) 0 b) 2 c) 1 d) any number of values Answer: c Explanation: A method can ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
m();
Console.ReadLine();
}
static void m()
{
Console.WriteLine(“HI”);
m();
}
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?
static void Main(string[] args)
{
Mul();
m();
Console.ReadLine();
}
static void Mul()
{
Console.WriteLine(“4”);
}
static void m()
{
Console.WriteLine(“3”);
Mul();
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View QuestionWhich of the following statements are correct about functions?
a) C# allows a function to have arguments with default values b) Redefining a method parameter in the ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
int a = 5;
int s = 0, c = 0;
Mul (a, ref s, ref c);
Console.WriteLine(s + “t ” +c);
Console.ReadLine();
}
static void Mul (int x, ref int ss, ref int cc)
{
ss = x * x;
cc = x * x * x;
}
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?
static void Main(string[] args)
{
int x = 8;
int b = 16;
int C = 64;
x /= b /= C;
Console.WriteLine(x + ” ” + b+ ” ” +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?
static void Main(string[] args)
{
int x = 8;
int b = 16;
int C = 64;
x /= b /= C;
Console.WriteLine(x + ” ” + b+ ” ” +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# expression?
int a+= (float) b/= (long)c.
What will be the output of the following C# expression? int a+= (float) b/= (long)c. a) ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
int x = 4 ,b = 2;
x -= b/= x * b;
Console.WriteLine(x + ” ” + b);
Console.ReadLine();
}
What will be the output of the following C# code? static void Main(string[] args)
View Question