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 = 1; funcv(num); Console.Write(num + "", ""); funcr(ref num); Console.Write(num + "", ""); } static void funcv(int num) { num = num + 10; Console.Write(num + "", ""); } static void funcr (ref int num) { num = num + 10; Console.Write(num + "", ""); } } }

Question:
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 = 1;             funcv(num);              Console.Write(num + "", "");              funcr(ref num);              Console.Write(num + "", "");         }         static void funcv(int num)         {              num = num + 10; Console.Write(num + "", "");         }         static void funcr (ref int num)         {              num = num + 10; Console.Write(num + "", "");         }      }  }

1.1, 1, 1, 1,

2.11, 1, 11, 11,

3.11, 11, 11, 11,

4.11, 11, 21, 11,

Posted Date:-2021-02-24 10:36:42


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!