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 i = 10;         
               double d = 34.340;         
               fun(i);         
               fun(d);        
       }        
       static void fun(double d)      
       {        
            Console.WriteLine(d + " ");    
         }   
      } 
    }

     

     

  2. A.

    10.000000 34.340000

    B.

    10 34

    C.

    10 34.340

    D.

    10 34.34

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment