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;      
            int res = fun(out i);              
            Console.WriteLine(res);             
        }     
        static int fun (out int i)           
        {
            int s = 1;     
            i = 7;      
            for(int j = 1; j return s;    
        }     
      }  
    }
    

  2. A.

    1

    B.

    7

    C.

    8

    D.

    720

    E.

    5040

    View Answer

    Workspace

    Answer : Option E

    Explanation :

    No answer description available for this question.


Be The First To Comment