Question from the C# - Fundamentals test

Write a C# program that swaps the values of two variables.

Easy

What does the following code return in display:

static void Main(string[] args) { 		  	  	 		 	   
            int a = 10; int b= 15; 		  	  	 		 	 	 	   
            int temp = 2*a; 		  	  	 		 	 	 	  
            a = b; 		  	  	 		 	 	 	  
            b = temp; 		  	  	 		 	 	 	  
            Console.WriteLine("a = "+a +" "+ "b = "+b);
 } 	
Author: MaximeStatus: Published(Update)Question passed 224 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!