Home » C# Programming » Functions and Subroutines

What will be the output of the C#.NET code snippet given below? namespace CuriousTabConsoleApplication { 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 <= i; j++) { s = s * j; } return s; } } }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!