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 FresherConsoleApplication
     {    
       class SampleProgram  
       {        
         static void Main(string[ ] args)   
          { 
             object[] o = new object[] {"1", 4.0, "Fresher", 'B'};             
             fun (o);   
          }     
          static void fun (params object[] obj)    
          {         
             for (int i = 0; i 1; i++)               
             Console.Write(obj[i] + " ");     
          }   
       } 
    }
    

     

  2. A.

    1 4.0 Fresher B

    B.

    1 4.0 Fresher

    C.

    1 4 Fresher

    D.

    1 Fresher B

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment