【C#-題庫】函式與程序
出處:http://www.indiabix.com/c-sharp-programming/functions-and-subroutines/
底下程式輸出為何?
namespace IndiabixConsoleApplication { 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 + ", "); } } }A. 1, 1, 1, 1, B. 11, 1, 11, 11, C. 11, 11, 11, 11, D. 11, 11, 21, 11, E. 11, 11, 21, 21,