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

  private static void Swap(int a, 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