Which of the following will be the correct output for the C#.NET program given below?
namespace IndiabixConsoleApplication
{
class Sample
{
int i;
Single j;
public void SetData(int i, Single j)
{
i = i;
j = j;
}
public void Display()
{
Console.WriteLine(i + " " + j);
}
}
class MyProgram
{
static void Main(string[ ] args)
{
Sample s1 = new Sample();
s1.SetData(5.4f);
s1.Display();
}
}
}Which of the following statements is correct about classes and objects in C#.NET?
The this reference gets created when a member function (non-shared) of a class is called.
Which of the following statements are correct?
Which of the following statements is correct about the C#.NET code snippet given below?
int i;
int j = new int();
i =j =
String str;
str = i.ToString();
str = j.ToString();Which of the following statements is correct about the C#.NET code snippet given below?
class Student ss// Here 'Student' is a user-defined class.
s1 = new Student();
s2 = new Student();Which of the following statements is correct about the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class Sample
{
public int index;
public int[] arr = new int[10];
public void fun(int i, int val)
{
arr[i] = val;
}
}
class MyProgram
{
static void Main(string[] args)
{
Sample s = new Sample();
s.index =
Sample.fun(5);
s.fun(5);
}
}
}Which of the following statements are correct about the this reference?
Which of the following statements is correct about the C#.NET code snippet given below?
class Sample
{
private int i;
public Single j;
private void DisplayData()
{
Console.WriteLine(i + " " + j);
}
public void ShowData()
{
Console.WriteLine(i + " " + j);
}
}Which of the following statements are correct about the C#.NET code snippet given below?
sample c;
c = new sample();
Which of the following will be the correct output for the C#.NET program given below?
namespace IndiabixConsoleApplication
{
class Sample
{
int i;
Single j;
public void SetData(int i, Single j)
{
this.i = i;
this.j = j;
}
public void Display()
{
Console.WriteLine(i + " " + j);
}
}
class MyProgram
{
static void Main(string[ ] args)
{
Sample s1 = new Sample();
s1.SetData(5.4f);
s1.Display();
}
}
}Which of the following statements are correct?
Which of the following statements are correct about objects of a user-defined class called Sample?
Which of the following statements is correct?
Which of the following statements are correct about the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class Sample
{
int i, j;
public void SetData(int ii, int jj)
{
this.i = ii;
this.j = jj
}
}
class MyProgram
{
static void Main(string[ ] args)
{
Sample s1 = new Sample();
s1.SetData(2);
Sample s2 = new Sample();
s2.SetData(10);
}
}
}Which of the following is the correct way to create an object of the class Sample?