C#技术基础试题——程序阅读题

  答案:i,s = 15, 56

  4. 写出以下程序运行结果。

  using System;

  class Test

  {

  static void LE(ref int a, ref int b) {

  int x = a;

  a = b; b = x;

  Console.writeLine (a + “ “ +b);

  }

  public static void Main ()

  {

  int x=10, y=25;

  LE(ref x, ref y);

  Console.writeLine (a + “ “ +b);

  }

  }

  答案:25 10

  25 10

  5. 写出下列函数的功能。

  static int SA(int a,int b)

点击关注本地宝
返回首页

推荐排行

最新阅读

反馈 提问