Home / C# Programming / Functions and Subroutines :: Discussion

Discussion :: Functions and Subroutines

  1. What will be the output of the C#.NET code snippet given below?

     namespace FresherGateConsoleApplication
     {   
         class SampleProgram   
         {          
            static void Main(string[] args)    
            {            
               int[]arr = newint[]{ 1, 2, 3, 4, 5 };          
              fun (ref arr);        
           }        
           static void fun(ref int[] a)        
           {              
               for (int i = 0; i 5;                 
                     Console.Write(a[ i ] + " ");             
               }        
             }  
     
          } 
       }
    
    

     

  2. A.

    1 2 3 4 5

    B.

    6 7 8 9 10

    C.

    5 10 15 20 25

    D.

    5 25 125 625 3125

    E.

    6 12 18 24 30

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment