Home » C# Programming » Functions and Subroutines

Which of the following will be the correct output for the C#.NET program given below? namespace CuriousTabConsoleApplication { class SampleProgram { static void Main(string[] args) { int num = 1; funcv(num); Console.Write(num + ", "); funcr(ref num); Console.Write(num + ", "); } static void funcv(int num) { num = num + 10; Console.Write(num + ", "); } static void funcr (ref int num) { num = num + 10; Console.Write(num + ", "); } } }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!