- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
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(36, 5.4f); 
            s1.Display(); 
        } 
    } 
}

1.0 0.0

2.36 5.4

3.36 5.400000

4.36 5

Posted Date:-2021-02-25 10:32:15


More MCQS Questions and answers

Search