X

Which of the following will be the correct output for the C#.NET program given below? namespace IndiabixConsoleApplication { struct Sample { public int i; } class MyProgram { static void Main(string[] args) { Sample x = new Sample(); x.i = 10; fun(ref x); Console.Write(x.i + " "); } public static void fun(ref Sample y) { y.i = 20; Console.Write(y.i + " "); } } }

( 5 )  .  1 Rating  .  10 Attempts
44 views   .  0 comments  .   . 

Download Solution PDF
  1.  20 10

  2.  10 20

  3.  10 10

  4.  20 20

Give Rating
Report

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

Write Your Comments or Explanations to Help Others
Comments(0)



No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Explore Other Libraries

X




Copyright (c) 2021 TuteeHUB

OPEN APP
Channel Join Group Join