Which of the following statements are correct about functions used in C#.NET?
Which of the following will be the correct output for the C#.NET program given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[] args)
{
int num = funcv(num);
Console.Write(num + ", ");
funcr(ref num);
Console.Write(num + ", ");
}
static void funcv(int num)
{
num = num +Console.Write(num + ", ");
}
static void funcr (ref int num)
{
num = num +Console.Write(num + ", ");
}
}
}Which of the following will be the correct output for the C#.NET program given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[] args)
{
int a =
int s =c = Proc(a, ref s, ref c);
Console.WriteLine(s + " " + c);
}
static void Proc(int x, ref int ss, ref int cc)
{
ss = x * x;
cc = x * x * x;
}
}
}What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[ ] args)
{
int i = int j;
fun1(ref i);
fun2(out j);
Console.WriteLine(i + ", " + j);
}
static void funl(ref int x)
{
x = x * x;
}
static void fun2(out int x)
{
x =
x = x * x;
}
}
}What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[ ] args)
{
int i;
int res = fun(out i);
Console.WriteLine(res);
}
static int fun (out int i)
{
int s = i = for(int j =j <= i; j++)
{
s = s * j;
}
return s;
}
}
}How many values is a function capable of returning?
What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[] args)
{
int[]arr = newint[]{5 };
fun(ref arr);
}
static void fun(ref int[] a)
{
for (int i =i < a.Length; i++)
{
a[i] = a[i] *
Console.Write(a[ i ] + " ");
}
}
}
}What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[ ] args)
{
int i = double d = 34. fun(i);
fun(d);
}
static void fun(double d)
{
Console.WriteLine(d + " ");
}
}
}If a function fun() is to sometimes receive an int and sometimes a double then which of the following is the correct way of defining this function?
static void fun(object i)
{ ... }static void fun(int i)
{ ... }static void fun(double i, int j)
{ ... }static void fun(int i, double j)
{ ... }static void fun(int i, double j, )
{ ... }What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[ ] args)
{
object[] o = new object[] {"1", 4."India", 'B'};
fun (o);
}
static void fun (params object[] obj)
{
for (int i =i < obj.Length-i++)
Console.Write(obj[i] + " ");
}
}
}Which of the following statements are correct?
Which of the following statements are correct?
Which of the following statements are correct about subroutines used in C#.NET?
A function can be used in an expression, whereas a subroutine cannot be.
How many values is a subroutine capable of returning?
A function returns a value, whereas a subroutine cannot return a value.
Which of the following statements are correct about functions and subroutines used in C#.NET?
If a procedure fun() is to receive an int, a Single & a double and it is to return a decimal then which of the following is the correct way of defining this procedure?
fun(int i, Single j, double k) decimal
{ ... }static decimal fun(int i, Single j, double k)
{ ... }fun(int i, Single j, double k)
{
...
return decimal;
}static decimal fun(int i, Single j, double k) decimal
{ ... }Which of the following statements are correct about the C#.NET program given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[ ] args)
{
int a = int s =c =
s, c = fun(a);
Console.WriteLine(s +" " + c) ;
}
static int fun(int x)
{
int ss, cc;
ss = x * x; cc = x * x * x;
return ss, cc;
}
}
}
Which of the following CANNOT occur multiple number of times in a program?