What will be printed out as a result of the following code execution:
 
class MyClass
     {
         static void Main() 
         {
              int a = 1, b = 2;
              change(ref a, ref b);   
              Console.WriteLine ("a=" + a + ", b=" + b);   
              Console.ReadLine(); 
      } 

      private static void change(ref int a, ref int b) 
     {
            int c = a; 
            a = b; 
            b = c; 
      }
 }
 

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes