Q:
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(10, 5.4f);
s1.Display();
}
}
}
A) 00
B) 10.5
C) 10 5.400
D) 10 5


Karthikeyan KRank #554 · 4.4K reputationPosted Aug 27, 2015, 4:21 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 27, 2015, 4:05 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 27, 2015, 4:17 AM EDT
Srinivas PabballaRank #5,010 · 315 reputationPosted Aug 27, 2015, 4:22 AM EDT
Karthikeyan KRank #554 · 4.4K reputationPosted Aug 27, 2015, 4:24 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 27, 2015, 4:48 AM EDT
Srinivas PabballaRank #5,010 · 315 reputationPosted Aug 27, 2015, 4:59 AM EDT