【简答题】写出下列程序的运行结果 static void Main(string[] args) { string a = "hello"; char b = a[0]; Console.WriteLine(b); Console.ReadKey(); } 输出结果是:
【简答题】写出下列程序的运行结果 static void Main(string[] args) { string[] Name = {" 张三 "," 李四 "," 王五 "," 赵六 " }; Name[3] = " 刘七 "; foreach (string mystr in Name) { Console.WriteLine(mystr); } Console.ReadLine(); } 输出结果是...
【简答题】写出下列程序的运行结果 static void Main(string[] args) { int var1 = 10; bool mybool = false; mybool = var1 = 2; Console.WriteLine(mybool); Console.ReadKey(); } 输出结果是:
【简答题】写出下列程序的运行结果 static void Main(string[] args) { int a = 10, b = 7; a += b; Console.WriteLine("a+=b 的值是 {0}",a); Console.ReadKey(); } 输出结果是:
【简答题】写出下列程序的运行结果 static void Main(string[] args) { int num = 1; while (num <= 5) { Console.Write (num+" ");// 引号中为一个空格 num++; } Console.ReadKey(); } 输出结果是:
【简答题】写出下列程序的运行结果 static void Main(string[] args) { string a = "www.yzgzx.com"; int b = a.LastIndexOf('z'); Console.WriteLine(b); Console.ReadKey(); } 输出结果是: