Question from the C# - Fundamentals test

Write a C# function that displays the elements of an array.

Medium

What the following code displays with the argument:
tab = {21,-5,87,6,1} ;

static void AffichageTab1D(int[] tab){ 		  	  	 		 	 
int longueur = tab.Length; 		  	  	 		 	 	
if(longueur>1){ 		  	  	 		 	 	 	  
     for(int i=0;i<longueur-1;i++){ 	  
         Console.Write(tab[i]+";");  	  
     } 		  	  	 		 	 	 	  
      Console.Write(tab[longueur-1]+"."); 	 	  
 } 		  	  	 		 	 	 	  
 else{ 		  	  	 		 	 	 	  
      Console.Write(tab[longueur-1]+"."); 	 	  
 } 		  	  	 		 	 	 	  
} 	
Author: SylvainStatus: Published(Update)Question passed 53 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!